Package org.eclipse.jetty.proxy
Class ProxyConnection
- java.lang.Object
-
- org.eclipse.jetty.io.AbstractConnection
-
- org.eclipse.jetty.proxy.ProxyConnection
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,Connection
- Direct Known Subclasses:
ConnectHandler.DownstreamConnection
,ConnectHandler.UpstreamConnection
public abstract class ProxyConnection extends AbstractConnection
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.eclipse.jetty.io.Connection
Connection.Listener, Connection.UpgradeFrom, Connection.UpgradeTo
-
-
Field Summary
Fields Modifier and Type Field Description protected static org.slf4j.Logger
LOG
-
Constructor Summary
Constructors Modifier Constructor Description protected
ProxyConnection(EndPoint endp, java.util.concurrent.Executor executor, ByteBufferPool bufferPool, java.util.concurrent.ConcurrentMap<java.lang.String,java.lang.Object> context)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
close(java.lang.Throwable failure)
ByteBufferPool
getByteBufferPool()
Connection
getConnection()
java.util.concurrent.ConcurrentMap<java.lang.String,java.lang.Object>
getContext()
void
onFillable()
Callback method invoked when the endpoint is ready to be read.protected abstract int
read(EndPoint endPoint, java.nio.ByteBuffer buffer)
void
setConnection(ProxyConnection connection)
java.lang.String
toConnectionString()
protected abstract void
write(EndPoint endPoint, java.nio.ByteBuffer buffer, Callback callback)
-
Methods inherited from class org.eclipse.jetty.io.AbstractConnection
addEventListener, close, failedCallback, fillInterested, getBytesIn, getBytesOut, getCreatedTimeStamp, getEndPoint, getExecutor, getInputBufferSize, getMessagesIn, getMessagesOut, isFillInterested, onClose, onFillInterestedFailed, onIdleExpired, onOpen, onReadTimeout, removeEventListener, setInputBufferSize, toString, tryFillInterested, tryFillInterested
-
-
-
-
Constructor Detail
-
ProxyConnection
protected ProxyConnection(EndPoint endp, java.util.concurrent.Executor executor, ByteBufferPool bufferPool, java.util.concurrent.ConcurrentMap<java.lang.String,java.lang.Object> context)
-
-
Method Detail
-
getByteBufferPool
public ByteBufferPool getByteBufferPool()
-
getContext
public java.util.concurrent.ConcurrentMap<java.lang.String,java.lang.Object> getContext()
-
getConnection
public Connection getConnection()
-
setConnection
public void setConnection(ProxyConnection connection)
-
onFillable
public void onFillable()
Description copied from class:AbstractConnection
Callback method invoked when the endpoint is ready to be read.
- Specified by:
onFillable
in classAbstractConnection
- See Also:
AbstractConnection.fillInterested()
-
read
protected abstract int read(EndPoint endPoint, java.nio.ByteBuffer buffer) throws java.io.IOException
- Throws:
java.io.IOException
-
write
protected abstract void write(EndPoint endPoint, java.nio.ByteBuffer buffer, Callback callback)
-
close
protected void close(java.lang.Throwable failure)
-
toConnectionString
public java.lang.String toConnectionString()
- Overrides:
toConnectionString
in classAbstractConnection
-
-