org.apache.coyote.http11.upgrade
Class UpgradeProcessor<S>
java.lang.Object
org.apache.coyote.http11.upgrade.UpgradeProcessor<S>
- All Implemented Interfaces:
- Processor<S>
- Direct Known Subclasses:
- UpgradeAprProcessor, UpgradeBioProcessor, UpgradeNioProcessor
public abstract class UpgradeProcessor<S>
- extends Object
- implements Processor<S>
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
sm
protected static final StringManager sm
UpgradeProcessor
protected UpgradeProcessor(UpgradeInbound upgradeInbound)
flush
public abstract void flush()
throws IOException
- Throws:
IOException
write
public abstract void write(int b)
throws IOException
- Throws:
IOException
write
public abstract void write(byte[] b,
int off,
int len)
throws IOException
- Throws:
IOException
read
public abstract int read()
throws IOException
- This is always a blocking read of a single byte.
- Returns:
- The next byte or -1 if the end of the input is reached.
- Throws:
IOException
- If a problem occurs trying to read from the input
read
public abstract int read(boolean block,
byte[] bytes,
int off,
int len)
throws IOException
- Read up to len bytes from the input in either blocking or non-blocking
mode (where non-blocking is supported). If the input does not support
non-blocking reads, a blcoking read will be performed.
- Parameters:
block
- bytes
- off
- len
-
- Returns:
- The number of bytes read or -1 if the end of the input is
reached. Non-blocking reads may return zero if no data is
available. Blocking reads never return zero.
- Throws:
IOException
- If a problem occurs trying to read from the input
getUpgradeInbound
public final UpgradeInbound getUpgradeInbound()
- Specified by:
getUpgradeInbound
in interface Processor<S>
upgradeDispatch
public final AbstractEndpoint.Handler.SocketState upgradeDispatch()
throws IOException
- Specified by:
upgradeDispatch
in interface Processor<S>
- Throws:
IOException
isUpgrade
public final boolean isUpgrade()
- Specified by:
isUpgrade
in interface Processor<S>
recycle
public final void recycle(boolean socketClosing)
- Specified by:
recycle
in interface Processor<S>
getExecutor
public final Executor getExecutor()
- Specified by:
getExecutor
in interface Processor<S>
process
public final AbstractEndpoint.Handler.SocketState process(SocketWrapper<S> socketWrapper)
throws IOException
- Specified by:
process
in interface Processor<S>
- Throws:
IOException
event
public final AbstractEndpoint.Handler.SocketState event(SocketStatus status)
throws IOException
- Specified by:
event
in interface Processor<S>
- Throws:
IOException
asyncDispatch
public final AbstractEndpoint.Handler.SocketState asyncDispatch(SocketStatus status)
- Specified by:
asyncDispatch
in interface Processor<S>
asyncPostProcess
public final AbstractEndpoint.Handler.SocketState asyncPostProcess()
- Specified by:
asyncPostProcess
in interface Processor<S>
isComet
public final boolean isComet()
- Specified by:
isComet
in interface Processor<S>
isAsync
public final boolean isAsync()
- Specified by:
isAsync
in interface Processor<S>
getRequest
public final Request getRequest()
- Specified by:
getRequest
in interface Processor<S>
setSslSupport
public final void setSslSupport(SSLSupport sslSupport)
- Specified by:
setSslSupport
in interface Processor<S>
Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.