|
||||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
See:
Description
Interface Summary | |
AddIPChannelAttributeController | Attribute controller interface for AddIPChannel components. |
ChannelOutAttributeController | ChannelOut attribute controller. |
IPChannelDestinationChunk | Chunk interface used to identify the IP channel a message is destinated. |
IPChannelSourceChunk | Chunk interface used to identify the IP channel that send the message. |
IPSocketManager | Interface used by ChannelOut to retreive a socket to send a message to an
IPChannelIn identified by its InetAddress and its port. |
IPSocketManagerCachingAttributeController | Attribute controller interface for socket cache. |
IPSocketManagerTCPAttributeController | Attribute controller for components providing an IPSocketManager
interface, using TCP/IP connection. |
OpenedSocket | Interface used by Push ChannelIn components to exchange open socket. |
OpenedSocketManagerMultiAttributeController | Attribute controller for multi threaded opened socket manager. |
SendByte | Interface provided by component that can be used to send a byte over a socket. |
SocketManager | Interface used by ChannelOut to retreive a socket to send a message to a ChannelIn. |
SocketManagerIPChunkBasedAttributeController | Attribute controller for SocketManager implementation that use a
chunk to identify a ChannelOut and retreive an associated socket. |
SocketManagerIPStaticAttributeController | Attribute controller for socket managers that only manage one opened socket. |
SocketState | Interface used by ChannelOut to identify a ChannelIn and to send it message. |
TCPAcceptSocketAttributeController | Attribute controller for IP Accept Socket, It defines the listening port. |
WaitByte | Interface provided by component that can be used to wait for a byte over a socket. |
Class Summary | |
AbstractAcceptSocketImpl | Abstract Accept socket component. |
AddIPChannelDestinationChunkImpl | This message transformer adds a IPChannelDestinationChunk containing
the inet address and the listenning port of a channel. |
AddIPChannelSourceChunkImpl | This message transformer adds a IPChannelSourceChunk containing the
inet address and the listenning port of a channel. |
GenericPushChannelInImpl | Generic push ChannelIn implementation. |
GenericPushChannelOutImpl | Generic Push ChannelOut. |
IPChannelDestinationChunkImpl | Basic Implementation of IPChannelDestinationChunk |
IPChannelSourceChunkImpl | Basic Implementation of IPChannelSourceChunk |
IPSocketManagerCachingImpl | This component manage a cache of SocketState . |
IPSocketManagerTCPImpl | IPSocketManager that handles one TCP connection at a time. |
OpenedSocketManagerMonoNotPersistentImpl | A opened socket manager for mono connection Channel. |
OpenedSocketManagerMonoPersistentImpl | A opened socket manager for persistent mono connection Channel. |
OpenedSocketManagerMultiPersistentImpl | Opened socket manager component that lanage multiple opened sockets at a time. |
SendByteStreamImpl | Write a byte from the given output used as OutputStream . |
SocketManagerIPChunkBasedImpl | Socket manager that retrieves sockets using an IPSocketManager and
getting IP and port in a IPChannelDestinationChunk in messages. |
SocketManagerIPStaticImpl | Socket manager managing only one open socket at a time. |
SocketStateImpl | Basic implementation of SocketState . |
TCPAcceptSocketImpl | Wraps TCP ServerSocket. |
WaitByteStreamImpl | Read a byte from the given input used as InputStream . |
Channel components are used to exchange messages between different address spaces.
We distinguish two Channel components : ChannelIn and ChannelOut.
This package contains various Channel implementations. They are
based on a socket abstraction. A socket provides an input,
an output, and a method to close it (see SocketState
interface).
Channel components use the MessageCodec
interface to encode and
decode messages using the socket's input or output.
Channel components are composite components build as follows:
TODO insert pictures
PushChannelOut components are made of:
GenericPushChannelOutImpl
). When this
component receives a message on its Push
interface, it uses a SocketManager
to retrieve a socket allowing sending the message. Then it uses a MessageCodec
to encode the message.
Finally, if the component is bound to a component providing a WaitByte
interface, it waits for an
acknowledgement.SocketState
object for each message to be sent.
They proceed as follows: they first choose a ChannelIn, then they find a socket allowing sending the message to the chosen ChannelIn.IPSocketManager
interface (see IPSocketManagerTCPImpl
component). SocketManagerIPStaticImpl
statically identifies a ChannelIn using its attribute controller
interface (SocketManagerIPStaticAttributeController
).
SocketManagerIPChunkBasedImpl
identifies a ChannelIn
by retrieving a IPChannelDestinationChunk
chunk in each
message. The name of the chunk can be configured using the attribute
controller interface (SocketManagerIPChunkBasedAttributeController
).
IPSocketManagerTCPImpl
creates a socket using given inet address and port. The release method
simply closes the socket state. IPSocketManagerCachingImpl
manages a cache
of sockets. If the required socket cannot be found in the cache or is
closed, this component delegates to another IPSocketManager.
The cache size can be configured using an attribute controller.PushChannelIn are made of:
channel.GeneriquePushChannelIn
). When this
component receives a socket on its OpenedSocket
interface, it uses a MessageCodec
to decode the incoming
message. Then, if the component is bound to a component providing a
SendByte
interface, it sends an
acknowledgement.SocketState
objects allowing reading a message.The Dream library currently provides the following TCPPushChannelOut components:
TCPPushChannelOutMonoDestination(inetAdress, port)
sends every message to the given inetAdress
and port
.
It uses a persistent connection.TCPPushChannelOutIpChunkMonoDestination(chunkName,
deleteChunk)
sends each message to the destination contained in the
chunk whose name is given as argument. If deleteChunk
is
true
the destination chunk is removed before the message is sent.
The connection is closed after the message is sent.TCPPushChannelOutIPChunkMultiDestination(nbMaxConn, chunkName,
deleteChunk)
, as previous channel, this one uses a chunk to know the
destination of each message. It manages a pool of opened socket; the size
of this pool is given by the nbMaxConn
argument. If the pool is
full and a message must be sent using a socket which is not in the pool, the
oldest socket is closed.TCPPushChannelOut
with TCPPushChannelOutAck
.
The Dream library currently provides the following TCPPushChannelIn:
TCPPushChannelInMonoConnPersistent(listenPort)
listens
on the given listenPort
. When a connection is established, it
reads messages until the connection is lost. This ChannelIn can be used with
the TCPPushChannelOutMonoDestination ChannelOut to build a one-to-one
channel (one ChannelOut sending messages to only one ChannelIn. The ChannelIn only receives messages from the ChannelOut). It can also be used with the
TCPPushChannelOutIPChunkMultiDestination to build a one-to-many channel.
TCPPushChannelInMonoConnNotPersistent(listenPort)
listens on the given listenPort
. When a connection is established,
it reads a message, then closes it. This ChannelIn can be used with the
TCPPushChannelOutIpChunkMonoDestination to build a many-to-many channel.
TCPPushChannelInMultiConnPersistent(listenPort,
maxOpenedSocket)
uses a pool of threads to simultaneously listen on many sockets. The maximum number of opened socket is specified by the
maxOpenedSocket
argument. When this bound is
reached, the ChannelIn will not accept new connections, until a socket is closed by
a pear. This ChannelIn can be used with the
TCPPushChannelOutIPChunkMultiDestination to build a many-to-many channel.
TCPPushChannelIn
with TCPPushChannelInAck
.
|
||||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |