All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.eclipse.jetty.server.HttpInput_async.puml Maven / Gradle / Ivy

There is a newer version: 4.15.102
Show newest version
@startuml
title "HttpInput"

participant AsyncContentDelivery as "[async\ncontent\ndelivery]"
participant HttpChannel as "Http\nChannel\n"
participant HttpChannelState as "Http\nChannel\nState"
participant HttpInputInterceptor as "Http\nInput.\nInterceptor"
participant AsyncContentProducer as "Async\nContent\nProducer"
participant HttpInput as "Http\nInput\n"
participant Application as "\nApplication\n"

autoactivate on

== Async Read ==

Application->HttpInput: read
activate Application
    HttpInput->AsyncContentProducer: nextContent
        AsyncContentProducer->AsyncContentProducer: next\nTransformed\nContent
            AsyncContentProducer->HttpChannel: produceContent
            return raw content or null
            alt if raw content is not null
                AsyncContentProducer->HttpInputInterceptor: readFrom
                return transformed content
            end 
        return
        alt if transformed content is not null
            AsyncContentProducer->HttpChannelState: onReadIdle
            return
        end
    return content or null
    note over HttpInput
        throw ISE
        if content
        is null
    end note
    HttpInput->AsyncContentProducer: reclaim
    return
return
deactivate Application

== isReady ==

Application->HttpInput: isReady
activate Application
    HttpInput->AsyncContentProducer: isReady
        AsyncContentProducer->AsyncContentProducer: next\nTransformed\nContent
            AsyncContentProducer->HttpChannel: produceContent
            return raw content or null
            alt if raw content is not null
                AsyncContentProducer->HttpInputInterceptor: readFrom
                return transformed content
            end 
        return
        alt if transformed content is not null
            AsyncContentProducer->HttpChannelState: onContentAdded
            return
        else transformed content is null
            AsyncContentProducer->HttpChannelState: onReadUnready
            return
            AsyncContentProducer->HttpChannel: needContent
            return
            alt if needContent returns true
                AsyncContentProducer->AsyncContentProducer: next\nTransformed\nContent
                return
                alt if transformed content is not null
                    AsyncContentProducer->HttpChannelState: onContentAdded
                    return
                end
            end
        end
    return boolean\n[transformed\ncontent is not null]
return
deactivate Application

alt if content arrives
    AsyncContentDelivery->HttpInput: onContentProducible
        HttpInput->AsyncContentProducer: onContentProducible
        alt if not at EOF
            AsyncContentProducer->HttpChannelState: onReadReady
            return true if woken
        else if at EOF
            AsyncContentProducer->HttpChannelState: onReadEof
            return true if woken
        end
        return true if woken
    return true if woken
    alt onContentProducible returns true
        AsyncContentDelivery->HttpChannel: execute(HttpChannel)
        return
    end
end

|||

== available ==

Application->HttpInput: available
activate Application
    HttpInput->AsyncContentProducer: available
        AsyncContentProducer->AsyncContentProducer: next\nTransformed\nContent
            AsyncContentProducer->HttpChannel: produceContent
            return raw content or null
            alt if raw content is not null
                AsyncContentProducer->HttpInputInterceptor: readFrom
                return transformed content
            end 
        return
    return content size or\n0 if content is null
return
deactivate Application

|||
@enduml




© 2015 - 2025 Weber Informatics LLC | Privacy Policy