Class HttpFrameReader
- java.lang.Object
-
- org.smallmind.web.reverse.http1_1.SourceAwareFrameReader
-
- org.smallmind.web.reverse.http1_1.HttpFrameReader
-
- All Implemented Interfaces:
FrameReader
- Direct Known Subclasses:
HttpRequestFrameReader,HttpResponseFrameReader
public abstract class HttpFrameReader extends SourceAwareFrameReader
-
-
Constructor Summary
Constructors Constructor Description HttpFrameReader(ReverseProxyService reverseProxyService, SocketChannel sourceChannel)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidfail(CannedResponse cannedResponse, SocketChannel failedChannel)voidflushBufferToTarget(boolean complete)abstract SocketChannelgetDestinationChannel()abstract HttpFramegetHttpFrame(ReverseProxyService reverseProxyService, SocketChannel sourceSocketChannel, HttpProtocolInputStream httpProtocolInputStream, HttpProtocolOutputStream httpProtocolOutputStream)abstract SocketChannelgetTargetChannel()voidprocessInput(SelectionKey selectionKey, ByteBuffer byteBuffer)voidwriteToBuffer(byte singleByte)-
Methods inherited from class org.smallmind.web.reverse.http1_1.SourceAwareFrameReader
getSourceChannel
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.smallmind.web.reverse.http1_1.FrameReader
closeChannels
-
-
-
-
Constructor Detail
-
HttpFrameReader
public HttpFrameReader(ReverseProxyService reverseProxyService, SocketChannel sourceChannel)
-
-
Method Detail
-
getTargetChannel
public abstract SocketChannel getTargetChannel()
-
getDestinationChannel
public abstract SocketChannel getDestinationChannel() throws ProtocolException
- Throws:
ProtocolException
-
getHttpFrame
public abstract HttpFrame getHttpFrame(ReverseProxyService reverseProxyService, SocketChannel sourceSocketChannel, HttpProtocolInputStream httpProtocolInputStream, HttpProtocolOutputStream httpProtocolOutputStream) throws IOException, ProtocolException
- Throws:
IOExceptionProtocolException
-
processInput
public void processInput(SelectionKey selectionKey, ByteBuffer byteBuffer)
-
writeToBuffer
public void writeToBuffer(byte singleByte) throws IOException- Throws:
IOException
-
flushBufferToTarget
public void flushBufferToTarget(boolean complete) throws IOException- Throws:
IOException
-
fail
public void fail(CannedResponse cannedResponse, SocketChannel failedChannel)
-
-