public class FilterConnection extends AbstractConnection
Modifier and Type | Class and Description |
---|---|
static class |
FilterConnection.DebugFilter |
static class |
FilterConnection.DumpToFileFilter |
static interface |
FilterConnection.Filter |
class |
FilterConnection.FilteredEndPoint |
Connection.Listener
Constructor and Description |
---|
FilterConnection(ByteBufferPool byteBufferPool,
Executor executor,
EndPoint endPoint,
int outputBufferSize) |
Modifier and Type | Method and Description |
---|---|
void |
addFilter(FilterConnection.Filter filter) |
void |
close()
Performs a logical close of this connection.
|
FilterConnection.FilteredEndPoint |
getFilterEndPoint() |
int |
getMessagesIn() |
int |
getMessagesOut() |
protected FilterConnection.FilteredEndPoint |
newFilterEndPoint() |
void |
onClose()
Callback method invoked when this
Connection is closed. |
void |
onFillable()
Callback method invoked when the endpoint is ready to be read.
|
void |
onFillInterestedFailed(Throwable cause)
Callback method invoked when the endpoint failed to be ready to be read.
|
void |
onOpen()
Callback method invoked when this
Connection is opened. |
boolean |
removeFilter(FilterConnection.Filter listener) |
String |
toString() |
addListener, fillInterested, getBytesIn, getBytesOut, getCreatedTimeStamp, getEndPoint, getExecutor, getInputBufferSize, onReadTimeout, setInputBufferSize
public FilterConnection(ByteBufferPool byteBufferPool, Executor executor, EndPoint endPoint, int outputBufferSize)
protected FilterConnection.FilteredEndPoint newFilterEndPoint()
public FilterConnection.FilteredEndPoint getFilterEndPoint()
public void addFilter(FilterConnection.Filter filter)
public boolean removeFilter(FilterConnection.Filter listener)
public void onOpen()
Connection
Callback method invoked when this Connection
is opened.
Creators of the connection implementation are responsible for calling this method.
onOpen
in interface Connection
onOpen
in class AbstractConnection
public void onClose()
Connection
Callback method invoked when this Connection
is closed.
Creators of the connection implementation are responsible for calling this method.
onClose
in interface Connection
onClose
in class AbstractConnection
public int getMessagesIn()
getMessagesIn
in interface Connection
getMessagesIn
in class AbstractConnection
public int getMessagesOut()
getMessagesOut
in interface Connection
getMessagesOut
in class AbstractConnection
public void close()
Connection
Performs a logical close of this connection.
For simple connections, this may just mean to delegate the close to the associated
EndPoint
but, for example, SSL connections should write the SSL close message
before closing the associated EndPoint
.
close
in interface AutoCloseable
close
in interface Connection
close
in class AbstractConnection
public void onFillable()
AbstractConnection
Callback method invoked when the endpoint is ready to be read.
onFillable
in class AbstractConnection
AbstractConnection.fillInterested()
public void onFillInterestedFailed(Throwable cause)
AbstractConnection
Callback method invoked when the endpoint failed to be ready to be read.
onFillInterestedFailed
in class AbstractConnection
cause
- the exception that caused the failurepublic String toString()
toString
in class AbstractConnection
Copyright © 1995-2012 Mort Bay Consulting. All Rights Reserved.