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.
|
org.snf4j.example.dtls |
A DTLS client/server example.
|
org.snf4j.example.echo |
An echoing (ping-pong traffic) client/server example.
|
org.snf4j.example.engine |
A custimized protocol engine (for Caesar Cipher) client/server example.
|
org.snf4j.example.heartbeat |
A datagram (UDP/IP) client/server example.
|
org.snf4j.example.sctp |
An SCTP client/server example.
|
org.snf4j.example.websocket |
A WebSocket (data transfer and web chat) client/server example.
|
org.snf4j.websocket |
Provides main interfaces and classes implementing the functionalities of the
Web Socket protocol.
|
org.snf4j.websocket.extensions.compress |
Provides interfaces and classes implementing the Web Socket compress extensions.
|
org.snf4j.websocket.frame |
Provides interfaces and classes for the Web Socket frames and related codecs.
|
org.snf4j.websocket.handshake |
Provides interfaces and classes for the Web Socket handshake frames and related codecs.
|
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 |
SctpMultiSession
The Stream Control Transmission Protocol (SCTP) multi-session.
|
class |
SctpSession
The Stream Control Transmission Protocol (SCTP) session.
|
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) |
List<Object> |
ICodecExecutor.encode(ISession session,
IByteBufferHolder data)
Encodes bytes from a byte buffer holder.
|
List<Object> |
DefaultCodecExecutor.encode(ISession session,
IByteBufferHolder data) |
void |
IEncoder.encode(ISession session,
I data,
List<O> out)
Encodes data from one type to another one.
|
void |
CompoundEncoder.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 |
IEventDrivenCodec.event(ISession session,
SessionEvent event)
Signals a session event to the codec.
|
void |
ICodecExecutor.event(ISession session,
SessionEvent event)
Signals a session event to all event-driven codecs in the associated
pipeline.
|
void |
EventDrivenCompoundEncoder.event(ISession session,
SessionEvent event) |
void |
EventDrivenCompoundDecoder.event(ISession session,
SessionEvent event) |
void |
DefaultCodecExecutor.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 |
ArrayToBufferHolderDecoder.decode(ISession session,
byte[] data,
List<IByteBufferHolder> out) |
void |
BufferToArrayDecoder.decode(ISession session,
ByteBuffer data,
List<byte[]> out) |
void |
BufferToBufferHolderDecoder.decode(ISession session,
ByteBuffer data,
List<IByteBufferHolder> out) |
void |
BufferHolderToArrayDecoder.decode(ISession session,
IByteBufferHolder data,
List<byte[]> out) |
void |
BufferHolderToBufferDecoder.decode(ISession session,
IByteBufferHolder data,
List<ByteBuffer> out) |
void |
ArrayToBufferEncoder.encode(ISession session,
byte[] data,
List<ByteBuffer> out) |
void |
ArrayToBufferHolderEncoder.encode(ISession session,
byte[] data,
List<IByteBufferHolder> out) |
void |
BufferToArrayEncoder.encode(ISession session,
ByteBuffer data,
List<byte[]> out) |
void |
BufferToBufferHolderEncoder.encode(ISession session,
ByteBuffer data,
List<IByteBufferHolder> out) |
void |
BufferHolderToArrayEncoder.encode(ISession session,
IByteBufferHolder data,
List<byte[]> out) |
void |
BufferHolderToBufferEncoder.encode(ISession session,
IByteBufferHolder data,
List<ByteBuffer> out) |
Modifier and Type | Method and Description |
---|---|
void |
ZlibEncoder.added(ISession session,
ICodecPipeline pipeline)
Does nothing.
|
void |
ZlibDecoder.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 |
ZlibEncoder.event(ISession session,
SessionEvent event)
Finishes the compression when the associated session is ending
(
SessionEvent.ENDING ). |
void |
ZlibDecoder.event(ISession session,
SessionEvent event)
Finishes the decompression when the associated session is ending
(
SessionEvent.ENDING ). |
protected void |
ZlibEncoder.postFinish(ISession session,
ByteBuffer out)
Called right after the compression has been finished.
|
protected boolean |
ZlibDecoder.postFinish(ISession session,
ByteBuffer in)
Called right after the decompression has been finished.
|
protected void |
GzipEncoder.postFinish(ISession session,
ByteBuffer out)
Generates the gzip footer.
|
protected boolean |
GzipDecoder.postFinish(ISession session,
ByteBuffer in)
Parses the gzip footer.
|
protected void |
ZlibDecoder.postInflate(ISession session,
byte[] data,
int off,
int len)
Called right after decompression of a portion of compressed data.
|
protected void |
GzipDecoder.postInflate(ISession session,
byte[] data,
int off,
int len)
Updates the CRC-32.
|
protected void |
ZlibEncoder.preDeflate(ISession session,
byte[] in,
ByteBuffer out)
Called right before compression of a portion of uncompressed data.
|
protected void |
GzipEncoder.preDeflate(ISession session,
byte[] in,
ByteBuffer out)
Generates the gzip header.
|
protected void |
ZlibEncoder.preFinish(ISession session,
ByteBuffer out)
Called right before finishing of the compression.
|
protected void |
GzipEncoder.preFinish(ISession session,
ByteBuffer out)
Generates the gzip header if the compression was finished
without compressing any data.
|
protected void |
ZlibDecoder.preInflate(ISession session,
ByteBuffer in)
Called right before decompression of a portion of compressed data.
|
protected void |
GzipDecoder.preInflate(ISession session,
ByteBuffer in)
Parses the gzip header.
|
void |
ZlibEncoder.removed(ISession session,
ICodecPipeline pipeline)
Does nothing.
|
void |
ZlibDecoder.removed(ISession session,
ICodecPipeline pipeline)
Does nothing.
|
Modifier and Type | Method and Description |
---|---|
ISession |
IFuture.getSession()
Returns the session this future is associated with.
|
ISession |
AbstractFuture.getSession() |
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 |
ISctpHandler.setSession(ISession session)
Set the SCTP session that will be associated with this handler.
|
void |
AbstractSctpHandler.setSession(ISession session) |
void |
IStreamHandler.setSession(ISession session)
Set the stream-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 |
IDatagramHandler.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 |
AbstractHandler.setSession(ISession session) |
void |
AbstractDatagramHandler.setSession(ISession session)
Sets the datagram-oriented session that will be associated with this
handler.
|
Modifier and Type | Interface and Description |
---|---|
interface |
ISessionPipeline<T extends ISession>
A manager that manages sessions in the pipeline that can be associated with a
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 |
ISctpMultiSession
Extends the
ISctpSession interface to cover SCTP functionalities
related to the SCTP multi sessions. |
interface |
ISctpSession
Extends the
ISession interface to cover SCTP functionalities. |
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.
|
Modifier and Type | Method and Description |
---|---|
void |
PacketDecoder.decode(ISession session,
byte[] data,
List<org.snf4j.example.dtls.Packet> out) |
void |
PacketEncoder.encode(ISession session,
org.snf4j.example.dtls.Packet data,
List<byte[]> out) |
Modifier and Type | Method and Description |
---|---|
void |
Decoder.decode(ISession session,
ByteBuffer data,
List<ByteBuffer> out) |
void |
Encoder.encode(ISession session,
ByteBuffer data,
List<ByteBuffer> out) |
Modifier and Type | Class and Description |
---|---|
class |
EngineSession |
Modifier and Type | Method and Description |
---|---|
void |
PacketDecoder.decode(ISession session,
byte[] data,
List<Packet> out) |
void |
PacketEncoder.encode(ISession session,
Packet data,
List<byte[]> out) |
Modifier and Type | Method and Description |
---|---|
void |
Decoder.decode(ISession session,
ByteBuffer data,
List<ByteBuffer> out) |
void |
Aggregator.decode(ISession session,
ByteBuffer data,
List<ByteBuffer> out) |
void |
Encoder.encode(ISession session,
ByteBuffer data,
List<ByteBuffer> out) |
Modifier and Type | Method and Description |
---|---|
int |
IndexPageDecoder.available(ISession session,
byte[] buffer,
int off,
int len) |
int |
IndexPageDecoder.available(ISession session,
ByteBuffer buffer,
boolean flipped) |
void |
IndexPageDecoder.decode(ISession session,
byte[] data,
List<byte[]> out) |
Modifier and Type | Interface and Description |
---|---|
interface |
IWebSocketSession
Extends the
IStreamSession interface to cover the Web Socket functionalities. |
Modifier and Type | Class and Description |
---|---|
class |
SSLWebSocketSession
The Secure Web Socket session implementing the WebSocket Protocol described in RFC 6455.
|
class |
WebSocketSession
The Web Socket session implementing the WebSocket Protocol described in RFC 6455.
|
Modifier and Type | Method and Description |
---|---|
void |
PerMessageDeflateDecoder.decode(ISession session,
Frame frame,
List<Frame> out) |
void |
PerMessageDeflateEncoder.encode(ISession session,
Frame frame,
List<Frame> out) |
Modifier and Type | Method and Description |
---|---|
int |
FrameDecoder.available(ISession session,
byte[] buffer,
int off,
int len) |
int |
FrameDecoder.available(ISession session,
ByteBuffer buffer,
boolean flipped) |
void |
FrameDecoder.decode(ISession session,
ByteBuffer data,
List<Frame> out) |
void |
FrameUtf8Validator.decode(ISession session,
Frame frame,
List<Frame> out) |
void |
FrameAggregator.decode(ISession session,
Frame data,
List<Frame> out) |
void |
FrameEncoder.encode(ISession session,
Frame frame,
List<ByteBuffer> out) |
Modifier and Type | Method and Description |
---|---|
void |
HandshakeEncoder.added(ISession session,
ICodecPipeline pipeline) |
int |
HandshakeDecoder.available(ISession session,
byte[] buffer,
int off,
int len) |
int |
HandshakeDecoder.available(ISession session,
ByteBuffer buffer,
boolean flipped) |
void |
HandshakeDecoder.decode(ISession session,
byte[] data,
List<HandshakeFrame> out) |
void |
HandshakeEncoder.encode(ISession session,
HandshakeFrame data,
List<ByteBuffer> out) |
void |
HandshakeEncoder.event(ISession session,
SessionEvent event) |
void |
HandshakeEncoder.removed(ISession session,
ICodecPipeline pipeline) |
void |
IHandshaker.setSession(ISession session)
Sets the session object this handshaker is associated with.
|
void |
Handshaker.setSession(ISession session) |
Copyright © 2017–2022 SNF4J.ORG. All rights reserved.