public abstract class AbstractProcessor<S> extends Object implements Processor<S>, WebConnection
| Modifier and Type | Field and Description |
|---|---|
protected static StringManager |
sm |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractProcessor(HttpUpgradeHandler httpUpgradeHandler,
AbstractServletInputStream upgradeServletInputStream,
AbstractServletOutputStream<S> upgradeServletOutputStream) |
| Modifier and Type | Method and Description |
|---|---|
AbstractEndpoint.Handler.SocketState |
asyncDispatch(SocketStatus status) |
AbstractEndpoint.Handler.SocketState |
asyncPostProcess() |
void |
close() |
void |
errorDispatch() |
AbstractEndpoint.Handler.SocketState |
event(SocketStatus status) |
Executor |
getExecutor() |
HttpUpgradeHandler |
getHttpUpgradeHandler() |
ServletInputStream |
getInputStream()
Provides access to the
ServletInputStream for reading data from
the client. |
ByteBuffer |
getLeftoverInput()
Allows retrieving additional input during the upgrade process
|
protected abstract Log |
getLog() |
ServletOutputStream |
getOutputStream()
Provides access to the
ServletOutputStream for writing data to
the client. |
Request |
getRequest() |
boolean |
isAsync() |
boolean |
isComet() |
boolean |
isUpgrade() |
AbstractEndpoint.Handler.SocketState |
process(SocketWrapper<S> socketWrapper) |
void |
recycle(boolean socketClosing) |
void |
setSslSupport(SSLSupport sslSupport) |
AbstractEndpoint.Handler.SocketState |
upgradeDispatch(SocketStatus status) |
protected static final StringManager sm
protected AbstractProcessor(HttpUpgradeHandler httpUpgradeHandler, AbstractServletInputStream upgradeServletInputStream, AbstractServletOutputStream<S> upgradeServletOutputStream)
protected abstract Log getLog()
public void close()
throws Exception
close in interface AutoCloseableExceptionpublic ServletInputStream getInputStream() throws IOException
javax.servlet.http.WebConnectionServletInputStream for reading data from
the client.getInputStream in interface WebConnectionIOException - If an I/O occurs while obtaining the streampublic ServletOutputStream getOutputStream() throws IOException
javax.servlet.http.WebConnectionServletOutputStream for writing data to
the client.getOutputStream in interface WebConnectionIOException - If an I/O occurs while obtaining the streampublic HttpUpgradeHandler getHttpUpgradeHandler()
getHttpUpgradeHandler in interface Processor<S>public final AbstractEndpoint.Handler.SocketState upgradeDispatch(SocketStatus status) throws IOException
upgradeDispatch in interface Processor<S>IOExceptionpublic final void recycle(boolean socketClosing)
public final Executor getExecutor()
getExecutor in interface Processor<S>public final AbstractEndpoint.Handler.SocketState process(SocketWrapper<S> socketWrapper) throws IOException
process in interface Processor<S>IOExceptionpublic final AbstractEndpoint.Handler.SocketState event(SocketStatus status) throws IOException
event in interface Processor<S>IOExceptionpublic final AbstractEndpoint.Handler.SocketState asyncDispatch(SocketStatus status)
asyncDispatch in interface Processor<S>public void errorDispatch()
errorDispatch in interface Processor<S>public final AbstractEndpoint.Handler.SocketState asyncPostProcess()
asyncPostProcess in interface Processor<S>public final Request getRequest()
getRequest in interface Processor<S>public final void setSslSupport(SSLSupport sslSupport)
setSslSupport in interface Processor<S>public ByteBuffer getLeftoverInput()
ProcessorgetLeftoverInput in interface Processor<S>Copyright © 2000-2015 Apache Software Foundation. All Rights Reserved.