Class UpgradeProcessorInternal
java.lang.Object
org.apache.coyote.AbstractProcessorLight
org.apache.coyote.http11.upgrade.UpgradeProcessorBase
org.apache.coyote.http11.upgrade.UpgradeProcessorInternal
- All Implemented Interfaces:
WebConnection, AutoCloseable, Processor
Upgrade processor for internal (Coyote-based) upgrade handlers.
-
Field Summary
Fields inherited from class UpgradeProcessorBase
INFINITE_TIMEOUT -
Constructor Summary
ConstructorsConstructorDescriptionUpgradeProcessorInternal(SocketWrapperBase<?> wrapper, UpgradeToken upgradeToken, UpgradeGroupInfo upgradeGroupInfo) Constructs a new UpgradeProcessorInternal. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()dispatch(SocketEvent status) Process an in-progress request that is no longer in standard HTTP mode.Provides access to theServletInputStreamfor reading data from the client.protected LoggetLog()Returns the logger associated with this processor type.Provides access to theServletOutputStreamfor writing data to the client.booleanReturns whether the internal handler has pending async I/O.voidpause()Informs the processor that the underlying I/O layer has stopped accepting new connections.final voidsetSslSupport(SSLSupport sslSupport) Set the SSL information for this HTTP connection.voidtimeoutAsync(long now) Check this processor to see if the timeout has expired and process a timeout if that is that case.Methods inherited from class UpgradeProcessorBase
asyncPostProcess, checkAsyncTimeoutGeneration, getLeftoverInput, getRequest, getUpgradeToken, isAsync, isUpgrade, recycle, serviceMethods inherited from class AbstractProcessorLight
addDispatch, clearDispatches, getIteratorAndClearDispatches, logAccess, process
-
Constructor Details
-
UpgradeProcessorInternal
public UpgradeProcessorInternal(SocketWrapperBase<?> wrapper, UpgradeToken upgradeToken, UpgradeGroupInfo upgradeGroupInfo) Constructs a new UpgradeProcessorInternal.- Parameters:
wrapper- the socket wrapperupgradeToken- the upgrade tokenupgradeGroupInfo- the group info for statistics
-
-
Method Details
-
dispatch
Description copied from class:AbstractProcessorLightProcess an in-progress request that is no longer in standard HTTP mode. Uses currently include Servlet 3.0 Async and HTTP upgrade connections. Further uses may be added in the future. These will typically start as HTTP requests.- Specified by:
dispatchin classAbstractProcessorLight- Parameters:
status- The event to process- Returns:
- The state the caller should put the socket in when this method returns
-
setSslSupport
Description copied from interface:ProcessorSet the SSL information for this HTTP connection.- Parameters:
sslSupport- The SSL support object to use for this connection
-
pause
public void pause()Description copied from interface:ProcessorInforms the processor that the underlying I/O layer has stopped accepting new connections. This is primarily intended to enable processors that use multiplexed connections to prevent further 'streams' being added to an existing multiplexed connection. -
getLog
Description copied from class:AbstractProcessorLightReturns the logger associated with this processor type.- Specified by:
getLogin classAbstractProcessorLight- Returns:
- the logger associated with this processor type
-
timeoutAsync
public void timeoutAsync(long now) Description copied from interface:ProcessorCheck this processor to see if the timeout has expired and process a timeout if that is that case.Note: The name of this method originated with the Servlet 3.0 asynchronous processing but evolved over time to represent a timeout that is triggered independently of the socket read/write timeouts.
- Specified by:
timeoutAsyncin interfaceProcessor- Overrides:
timeoutAsyncin classUpgradeProcessorBase- Parameters:
now- The time (as returned bySystem.currentTimeMillis()) to use as the current time to determine whether the timeout has expired. If negative, the timeout will always be treated as if it has expired.
-
hasAsyncIO
public boolean hasAsyncIO()Returns whether the internal handler has pending async I/O.- Returns:
- true if there is async I/O
-
close
-
getInputStream
Description copied from interface:jakarta.servlet.http.WebConnectionProvides access to theServletInputStreamfor reading data from the client.- Returns:
- the input stream
- Throws:
IOException- If an I/O occurs while obtaining the stream
-
getOutputStream
Description copied from interface:jakarta.servlet.http.WebConnectionProvides access to theServletOutputStreamfor writing data to the client.- Returns:
- the output stream
- Throws:
IOException- If an I/O occurs while obtaining the stream
-