Package | Description |
---|---|
org.snf4j.core |
Provides interfaces and classes implementing the core functionalities of the
API.
|
org.snf4j.core.codec |
Provides interfaces and classes for implementing encoders, decoders and
codec pipelines.
|
org.snf4j.core.codec.bytes |
Encoders and decoders which transform an array of bytes into a
ByteBuffer and vice versa. |
org.snf4j.core.codec.zip | |
org.snf4j.core.future |
Provides interfaces and classes used by the API to implement futures.
|
org.snf4j.core.handler |
Provides interfaces and classes for implementing sessions' handlers.
|
org.snf4j.core.session |
Provides classes and interfaces used for session handling.
|
Modifier and Type | Class and Description |
---|---|
class |
DatagramSession
The core implementation of the
IDatagramSession interface. |
class |
DTLSSession
The datagram-oriented session that handles DTLS connections.
|
class |
EngineDatagramSession
A datagram-oriented session that handles protocols driven by customized protocol engines
implementing the
IEngine interface. |
class |
EngineStreamSession
A stream-oriented session that handles protocols driven by customized protocol engines
implementing the
IEngine interface. |
class |
SSLSession
The stream-oriented session that handles SSL/TLS connections.
|
class |
StreamSession
The core implementation of the
IStreamSession interface. |
Modifier and Type | Method and Description |
---|---|
void |
ICodecExecutor.addChild(ISession session,
ICodecExecutor executor)
Adds a child codec executor that will be receiving session events
received by this codec executor.
|
void |
DefaultCodecExecutor.addChild(ISession session,
ICodecExecutor executor) |
void |
IEventDrivenCodec.added(ISession session,
ICodecPipeline pipeline)
Signals that the codec has been added to the pipeline associated with a
session.
|
void |
EventDrivenCompoundEncoder.added(ISession session,
ICodecPipeline pipeline) |
void |
EventDrivenCompoundDecoder.added(ISession session,
ICodecPipeline pipeline) |
int |
IBaseDecoder.available(ISession session,
byte[] buffer,
int off,
int len)
Determines how many bytes should be read from the input buffer to create
the byte array that will be then passed to the
IDecoder.decode(org.snf4j.core.session.ISession, I, java.util.List<O>)
method. |
int |
IBaseDecoder.available(ISession session,
ByteBuffer buffer,
boolean flipped)
Determines how many bytes should be read from the input buffer to create
the byte array that will be then passed to the
IDecoder.decode(org.snf4j.core.session.ISession, I, java.util.List<O>) method. |
List<Object> |
ICodecExecutor.decode(ISession session,
byte[] data)
Decodes bytes from a byte array.
|
List<Object> |
DefaultCodecExecutor.decode(ISession session,
byte[] data) |
List<Object> |
ICodecExecutor.decode(ISession session,
ByteBuffer data)
Decodes bytes from a byte buffer.
|
List<Object> |
DefaultCodecExecutor.decode(ISession session,
ByteBuffer data) |
void |
IDecoder.decode(ISession session,
I data,
List<O> out)
Decodes data from one type to another one.
|
void |
CompoundDecoder.decode(ISession session,
I data,
List<O> out)
Decodes data from one type to another one.
|
List<Object> |
ICodecExecutor.encode(ISession session,
byte[] data)
Encodes bytes from a byte array.
|
List<Object> |
DefaultCodecExecutor.encode(ISession session,
byte[] data) |
List<Object> |
ICodecExecutor.encode(ISession session,
ByteBuffer data)
Encodes bytes from a byte buffer.
|
List<Object> |
DefaultCodecExecutor.encode(ISession session,
ByteBuffer data) |
void |
CompoundEncoder.encode(ISession session,
I data,
List<O> out)
Encodes data from one type to another one.
|
void |
IEncoder.encode(ISession session,
I data,
List<O> out)
Encodes data from one type to another one.
|
List<Object> |
ICodecExecutor.encode(ISession session,
Object msg)
Encodes a message.
|
List<Object> |
DefaultCodecExecutor.encode(ISession session,
Object msg) |
void |
ICodecExecutor.event(ISession session,
SessionEvent event)
Signals a session event to all event-driven codecs in the associated
pipeline.
|
void |
IEventDrivenCodec.event(ISession session,
SessionEvent event)
Signals a session event to the codec.
|
void |
DefaultCodecExecutor.event(ISession session,
SessionEvent event) |
void |
EventDrivenCompoundEncoder.event(ISession session,
SessionEvent event) |
void |
EventDrivenCompoundDecoder.event(ISession session,
SessionEvent event) |
void |
IEventDrivenCodec.removed(ISession session,
ICodecPipeline pipeline)
Signals that the codec has been removed from the pipeline associated with a
session.
|
void |
EventDrivenCompoundEncoder.removed(ISession session,
ICodecPipeline pipeline) |
void |
EventDrivenCompoundDecoder.removed(ISession session,
ICodecPipeline pipeline) |
void |
ICodecExecutor.syncDecoders(ISession session)
Informs the codec executor that right now is the best moment to safely
synchronize any pending changes for decoders in the associated
pipeline.
|
void |
DefaultCodecExecutor.syncDecoders(ISession session) |
void |
ICodecExecutor.syncEncoders(ISession session)
Informs the codec executor that right now is the best moment to safely
synchronize any pending changes for encoders in the associated
pipeline.
|
void |
DefaultCodecExecutor.syncEncoders(ISession session) |
void |
ICodecExecutor.syncEventDrivenCodecs(ISession session)
Informs the codec executor that right now is the best moment to safely
synchronize any pending changes for event-driven codecs in the associated
pipeline.
|
void |
DefaultCodecExecutor.syncEventDrivenCodecs(ISession session) |
Modifier and Type | Method and Description |
---|---|
void |
ArrayToBufferDecoder.decode(ISession session,
byte[] data,
List<ByteBuffer> out) |
void |
BufferToArrayDecoder.decode(ISession session,
ByteBuffer data,
List<byte[]> out) |
void |
ArrayToBufferEncoder.encode(ISession session,
byte[] data,
List<ByteBuffer> out) |
void |
BufferToArrayEncoder.encode(ISession session,
ByteBuffer data,
List<byte[]> out) |
Modifier and Type | Method and Description |
---|---|
void |
ZlibDecoder.added(ISession session,
ICodecPipeline pipeline)
Does nothing.
|
void |
ZlibEncoder.added(ISession session,
ICodecPipeline pipeline)
Does nothing.
|
void |
ZlibDecoder.decode(ISession session,
byte[] data,
List<ByteBuffer> out)
Decompresses the input data.
|
void |
ZlibEncoder.encode(ISession session,
byte[] data,
List<ByteBuffer> out)
Compresses the input data.
|
void |
ZlibDecoder.event(ISession session,
SessionEvent event)
Finishes the decompression when the associated session is ending
(
SessionEvent.ENDING ). |
void |
ZlibEncoder.event(ISession session,
SessionEvent event)
Finishes the compression when the associated session is ending
(
SessionEvent.ENDING ). |
protected boolean |
GzipDecoder.postFinish(ISession session,
ByteBuffer in)
Parses the gzip footer.
|
protected void |
GzipEncoder.postFinish(ISession session,
ByteBuffer out)
Generates the gzip footer.
|
protected boolean |
ZlibDecoder.postFinish(ISession session,
ByteBuffer in)
Called right after the decompression has been finished.
|
protected void |
ZlibEncoder.postFinish(ISession session,
ByteBuffer out)
Called right after the compression has been finished.
|
protected void |
GzipDecoder.postInflate(ISession session,
byte[] data,
int off,
int len)
Updates the CRC-32.
|
protected void |
ZlibDecoder.postInflate(ISession session,
byte[] data,
int off,
int len)
Called right after decompression of a portion of compressed data.
|
protected void |
GzipEncoder.preDeflate(ISession session,
byte[] in,
ByteBuffer out)
Generates the gzip header.
|
protected void |
ZlibEncoder.preDeflate(ISession session,
byte[] in,
ByteBuffer out)
Called right before compression of a portion of uncompressed data.
|
protected void |
GzipEncoder.preFinish(ISession session,
ByteBuffer out)
Generates the gzip header if the compression was finished
without compressing any data.
|
protected void |
ZlibEncoder.preFinish(ISession session,
ByteBuffer out)
Called right before finishing of the compression.
|
protected void |
GzipDecoder.preInflate(ISession session,
ByteBuffer in)
Parses the gzip header.
|
protected void |
ZlibDecoder.preInflate(ISession session,
ByteBuffer in)
Called right before decompression of a portion of compressed data.
|
void |
ZlibDecoder.removed(ISession session,
ICodecPipeline pipeline)
Does nothing.
|
void |
ZlibEncoder.removed(ISession session,
ICodecPipeline pipeline)
Does nothing.
|
Modifier and Type | Method and Description |
---|---|
ISession |
AbstractFuture.getSession() |
ISession |
IFuture.getSession()
Returns the session this future is associated with.
|
Constructor and Description |
---|
AbstractFuture(ISession session)
Constructs a base implementation with the specified session.
|
CancelledFuture(ISession session)
Constructs a cancelled future.
|
CompletedFuture(ISession session,
org.snf4j.core.future.FutureState state)
Constructs a completed future with the specified session.
|
FailedFuture(ISession session,
Throwable cause)
Constructs a failed future.
|
RegisterFuture(ISession session)
Constructs a register future associated with a session.
|
SessionFuturesController(ISession session)
Constructs a future controller associated with the specified session
|
SuccessfulFuture(ISession session)
Constructs a successful future.
|
TaskFuture(ISession session)
Constructs a task future associated with a session.
|
Modifier and Type | Method and Description |
---|---|
ISession |
IHandler.getSession()
Returns the session that is associated with this handler.
|
ISession |
AbstractHandler.getSession() |
Modifier and Type | Method and Description |
---|---|
void |
AbstractDatagramHandler.setSession(ISession session)
Sets the datagram-oriented session that will be associated with this
handler.
|
void |
AbstractStreamHandler.setSession(ISession session)
Sets the stream-oriented session that will be associated with this
handler.
|
void |
IStreamHandler.setSession(ISession session)
Set the stream-oriented session that will be associated with this handler.
|
void |
IDatagramHandler.setSession(ISession session)
Sets the datagram-oriented session that will be associated with this handler.
|
void |
IHandler.setSession(ISession session)
Sets the session that will be associated with this handler.
|
void |
AbstractHandler.setSession(ISession session) |
Modifier and Type | Interface and Description |
---|---|
interface |
IDatagramSession
Extends the
ISession interface to cover datagram-oriented functionalities. |
interface |
IEngineDatagramSession
A engine-driven session which represents connection between datagram-oriented
end-points.
|
interface |
IEngineSession
A engine-driven session which represents connection between end-points
regardless of transport type.
|
interface |
IEngineStreamSession
A engine-driven session which represents connection between stream-oriented
end-points.
|
interface |
IStreamSession
Extends the
ISession interface to cover stream-oriented functionalities. |
Modifier and Type | Class and Description |
---|---|
class |
AbstractSession
Base implementation of the
ISession interface. |
Modifier and Type | Method and Description |
---|---|
ISession |
ISession.getParent()
Gets the parent session.
|
Copyright © 2017–2021 SNF4J.ORG. All rights reserved.