The NetSwitch server has two types of devices:
Listeners. A Connector (or client) connects to a remote
listener, and can have only one bidirectional communication channel (or
socket). A Listener (or server) waits for connections from remote
clients, and can have several bidirectional communication channels, one for
ChannelFilter is an external component.
Each time a Connector or Listener channel is created, a new
instance of a
ChannelFilter is initialized
and bound to the channel. From that point on, every inbound or outbound
Message is passed to the
ChannelFilter for inspection and possible
modification. Finally, when the channel is closed, the
ChannelFilter instance is terminated and released.
ChannelCodec is another type of external
component. Each time a Connector or Listener channel receives
input bytes, it calls the
decode the bytes and produce an inbound
Message. Also, each time a channel writes a
Message, it calls the
ChannelCodec to encode the message into an outbound
sequence of bytes.
ClassDescriptionEncodes and decodes messages sent through a communication channel.Inspects or modifies inbound and outbound
Messagesof a communication channel.Allows a
ChannelCodecto communicate with its container.Signals that a encoder/decoder error of some kind has occurred.Allows a
ChannelFilterto communicate with its container.Signals that a filter error of some kind has occurred.