Top Fields Constructors Methods
org.apache.coyote.http11.upgrade

public Class UpgradeProcessorInternal

extends UpgradeProcessorBase
Class Inheritance
Imports
java.io.IOException, jakarta.servlet.ServletInputStream, .ServletOutputStream, org.apache.coyote.UpgradeToken, org.apache.juli.logging.Log, .LogFactory, org.apache.tomcat.util.net.AbstractEndpoint.Handler.SocketState, .SSLSupport, .SocketEvent, .SocketWrapperBase

Field Summary

Modifier and TypeField and Description
private final InternalHttpUpgradeHandler
private static final Log
Inherited from org.apache.coyote.http11.upgrade.UpgradeProcessorBase:
INFINITE_TIMEOUT

Constructor Summary

AccessConstructor and Description
public
UpgradeProcessorInternal(SocketWrapperBase<?> wrapper, UpgradeToken upgradeToken, UpgradeGroupInfo upgradeGroupInfo)

Method Summary

Modifier and TypeMethod and Description
public void
close()

Implements java.lang.AutoCloseable.close.

Closes this resource, relinquishing any underlying resources.

public AbstractEndpoint.Handler.SocketState
dispatch(SocketEvent
The event to process
status
)

Implements abstract org.apache.coyote.AbstractProcessorLight.dispatch.

Process an in-progress request that is not longer in standard HTTP mode.

public ServletInputStream
getInputStream()

Implements jakarta.servlet.http.WebConnection.getInputStream.

Provides access to the ServletInputStream for reading data from the client.

protected Log
public ServletOutputStream
getOutputStream()

Implements jakarta.servlet.http.WebConnection.getOutputStream.

Provides access to the ServletOutputStream for writing data to the client.

public boolean
public void
pause()

Implements org.apache.coyote.Processor.pause.

Informs the processor that the underlying I/O layer has stopped accepting new connections.

public final void
setSslSupport(SSLSupport
The SSL support object to use for this connection
sslSupport
)

Implements org.apache.coyote.Processor.setSslSupport.

Set the SSL information for this HTTP connection.

public void
timeoutAsync(long
The time (as returned by System#currentTimeMillis() to use as the current time to determine whether the timeout has expired. If negative, the timeout will always be treated as ifq it has expired.
now
)

Overrides org.apache.coyote.http11.upgrade.UpgradeProcessorBase.timeoutAsync.

Implements org.apache.coyote.Processor.timeoutAsync.

Check this processor to see if the timeout has expired and process a timeout if that is that case.

Inherited from org.apache.coyote.http11.upgrade.UpgradeProcessorBase:
asyncPostProcesscheckAsyncTimeoutGenerationgetLeftoverInputgetRequestgetUpgradeTokenisAsyncisUpgraderecycleservice

Field Detail

internalHttpUpgradeHandlerback to summary
private final InternalHttpUpgradeHandler internalHttpUpgradeHandler
logback to summary
private static final Log log

Constructor Detail

UpgradeProcessorInternalback to summary
public UpgradeProcessorInternal(SocketWrapperBase<?> wrapper, UpgradeToken upgradeToken, UpgradeGroupInfo upgradeGroupInfo)

Method Detail

closeback to summary
public void close() throws Exception

Implements java.lang.AutoCloseable.close.

Doc from java.lang.AutoCloseable.close.

Closes this resource, relinquishing any underlying resources. This method is invoked automatically on objects managed by the try-with-resources statement.

Annotations
@Override
Exceptions
Exception:
if this resource cannot be closed
dispatchback to summary
public AbstractEndpoint.Handler.SocketState dispatch(SocketEvent status)

Implements abstract org.apache.coyote.AbstractProcessorLight.dispatch.

Doc from org.apache.coyote.AbstractProcessorLight.dispatch.

Process an in-progress request that is not 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.

Parameters
status:SocketEvent

The event to process

Returns:AbstractEndpoint.Handler.SocketState

The state the caller should put the socket in when this method returns

Annotations
@Override
getInputStreamback to summary
public ServletInputStream getInputStream() throws IOException

Implements jakarta.servlet.http.WebConnection.getInputStream.

Doc from jakarta.servlet.http.WebConnection.getInputStream.

Provides access to the ServletInputStream for reading data from the client.

Returns:ServletInputStream

the input stream

Annotations
@Override
Exceptions
IOException:
If an I/O occurs while obtaining the stream
getLogback to summary
protected Log getLog()

Implements abstract org.apache.coyote.AbstractProcessorLight.getLog.

Annotations
@Override
getOutputStreamback to summary
public ServletOutputStream getOutputStream() throws IOException

Implements jakarta.servlet.http.WebConnection.getOutputStream.

Doc from jakarta.servlet.http.WebConnection.getOutputStream.

Provides access to the ServletOutputStream for writing data to the client.

Returns:ServletOutputStream

the output stream

Annotations
@Override
Exceptions
IOException:
If an I/O occurs while obtaining the stream
hasAsyncIOback to summary
public boolean hasAsyncIO()
pauseback to summary
public void pause()

Implements org.apache.coyote.Processor.pause.

Doc from org.apache.coyote.Processor.pause.

Informs 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.

Annotations
@Override
setSslSupportback to summary
public final void setSslSupport(SSLSupport sslSupport)

Implements org.apache.coyote.Processor.setSslSupport.

Doc from org.apache.coyote.Processor.setSslSupport.

Set the SSL information for this HTTP connection.

Parameters
sslSupport:SSLSupport

The SSL support object to use for this connection

Annotations
@Override
timeoutAsyncback to summary
public void timeoutAsync(long now)

Overrides org.apache.coyote.http11.upgrade.UpgradeProcessorBase.timeoutAsync.

Implements org.apache.coyote.Processor.timeoutAsync.

Doc from org.apache.coyote.Processor.timeoutAsync.

Check 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.

Parameters
now:long

The time (as returned by System#currentTimeMillis() to use as the current time to determine whether the timeout has expired. If negative, the timeout will always be treated as ifq it has expired.

Annotations
@Override