org.eclipse.jetty.server.HttpInput_async.puml Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jetty-server Show documentation
Show all versions of jetty-server Show documentation
The core jetty server artifact.
@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->HttpInput: copy content\ninto byte[]
return
alt content is empty
HttpInput->AsyncContentProducer: reclaim
return
end
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
AsyncContentProducer->HttpChannelState: onReadUnready
return
loop
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
note over AsyncContentProducer
break loop
end note
end
else
note over AsyncContentProducer
break loop
end note
end
end
return boolean\n[transformed\ncontent is not null]
return
deactivate Application
alt if content arrives
AsyncContentDelivery->HttpInput: onContentProducible
HttpInput->AsyncContentProducer: onContentProducible
AsyncContentProducer->HttpChannelState: onReadReady
return true if woken
return true if woken
return true if woken
alt onContentProducible returns true
AsyncContentDelivery->HttpChannel: handle()
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 - 2024 Weber Informatics LLC | Privacy Policy