Package org.jgrapes.io
Class IOSubchannel.DefaultIOSubchannel
java.lang.Object
org.jgrapes.core.Subchannel.DefaultSubchannel
org.jgrapes.io.IOSubchannel.DefaultIOSubchannel
- All Implemented Interfaces:
Associator
,Channel
,Eligible
,Subchannel
,IOSubchannel
- Direct Known Subclasses:
LinkedIOSubchannel
,ProcessManager.ProcessChannel
,SocketConnectionManager.SocketChannelImpl
- Enclosing interface:
IOSubchannel
public static class IOSubchannel.DefaultIOSubchannel
extends Subchannel.DefaultSubchannel
implements IOSubchannel
A simple implementation of
IOSubchannel
.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.jgrapes.core.Channel
Channel.Default
Nested classes/interfaces inherited from interface org.jgrapes.io.IOSubchannel
IOSubchannel.DefaultIOSubchannel
Nested classes/interfaces inherited from interface org.jgrapes.core.Subchannel
Subchannel.DefaultSubchannel
-
Field Summary
-
Constructor Summary
ConstructorDescriptionDefaultIOSubchannel
(Channel mainChannel, EventPipeline responsePipeline) Creates a new instance with the given main channel and response pipeline. -
Method Summary
Modifier and TypeMethodDescriptionReturns the buffer pool set.Returns the buffer pool set.Gets theEventPipeline
that can be used for events going back to the initiator of this connection.protected void
setByteBufferPool
(ManagedBufferPool<ManagedBuffer<ByteBuffer>, ByteBuffer> bufferPool) protected void
setCharBufferPool
(ManagedBufferPool<ManagedBuffer<CharBuffer>, CharBuffer> bufferPool) Methods inherited from class org.jgrapes.core.Subchannel.DefaultSubchannel
associated, mainChannel, setAssociated, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.jgrapes.core.Associator
associated, associated, associated, associated, associatedGet, setAssociated
Methods inherited from interface org.jgrapes.io.IOSubchannel
respond
Methods inherited from interface org.jgrapes.core.Subchannel
defaultCriterion, isEligibleFor, mainChannel
-
Constructor Details
-
DefaultIOSubchannel
Creates a new instance with the given main channel and response pipeline.- Parameters:
mainChannel
- the main channelresponsePipeline
- the response pipeline to use
-
-
Method Details
-
setByteBufferPool
protected void setByteBufferPool(ManagedBufferPool<ManagedBuffer<ByteBuffer>, ByteBuffer> bufferPool) -
setCharBufferPool
protected void setCharBufferPool(ManagedBufferPool<ManagedBuffer<CharBuffer>, CharBuffer> bufferPool) -
responsePipeline
Description copied from interface:IOSubchannel
Gets theEventPipeline
that can be used for events going back to the initiator of this connection.Consistently using this event pipeline for response events ensures that the events are written in proper sequence.
- Specified by:
responsePipeline
in interfaceIOSubchannel
- Returns:
- the event pipeline
-
byteBufferPool
Returns the buffer pool set.If no buffer pool has been set, a buffer pool with with two buffers of size 4096 is created.
- Specified by:
byteBufferPool
in interfaceIOSubchannel
- Returns:
- the buffer pool
-
charBufferPool
Returns the buffer pool set.If no buffer pool has been set, a buffer pool with with two buffers of size 4096 is created.
- Specified by:
charBufferPool
in interfaceIOSubchannel
- Returns:
- the buffer pool
-