| | | | SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
|
|
com.newstep.solid.netio.slip
|
+--com.newstep.solid.netio.slip.SlipAccessPoint
public class SlipAccessPoint
The access point for Simple Length Indicated Protocol (SLIP).
The SlipAccessPoint manages access to SlipChannel instances for both client
and server SlipChannel usage. In order to provide a Slip server, the
SlipAccessPoint.listen(...) must be invoked with an associated
ConnectionListener such that the access point knows the proper handler for
newly created SlipChannels. In addition, the access point must receive the
localEndpoint infomation indicating how it should manifest itself as a
listening server.
Client implementations may access SlipChannels via the openChannel(...)
methods. These methods provide both blocking and non-blocking channel
openning mechanisms.
NOTE: when openChannel be sure that the returned
SlipChannel is assigned both a com.newstep.solid.netio.MessageListener
and a com.newstep.solid.netio.CommChannelStateListener.
These may be assigned by the openChannel(...) function. Please check the
docs for further details.
In order to maintain the transport protocol abstraction, the SlipAccessPoint
leverages the underlying transport protocol access point whose factory class
MUST be defined in the SlipAccessPointConfig.
In order to avoid exposing the newConnection(...) function to its
clients, the SlipAccessPoint leverages the SlipTranConnListener to handle
new connections from the transport layer. This encapsulation also helps to
associate the channel with the local endpoint on which it was connected.
Links:
Kernel Association Association Link
The access point for the associated transport channels
Associates type:
association
Client cardinality:
1
Client navigability:
NOT NAVIGABLE
Client visibility:
private
Supplier cardinality:
1
Supplier navigability:
NAVIGABLE
Supplier visibility:
protected
Kernel Association Association Link
Associates type:
association
Client cardinality:
1
Client navigability:
NOT NAVIGABLE
Client visibility:
private
Supplier cardinality:
1
Supplier navigability:
NAVIGABLE
Supplier visibility:
private
Generalization Generalization Link
The access point for Simple Length Indicated Protocol (SLIP).
The SlipAccessPoint manages access to SlipChannel instances for both client
and server SlipChannel usage. In order to provide a Slip server, the
SlipAccessPoint.listen(...) must be invoked with an associated
ConnectionListener such that the access point knows the proper handler for
newly created SlipChannels. In addition, the access point must receive the
localEndpoint infomation indicating how it should manifest itself as a
listening server.
Client implementations may access SlipChannels via the openChannel(...)
methods. These methods provide both blocking and non-blocking channel
openning mechanisms.
NOTE: when openChannel be sure that the returned
SlipChannel is assigned both a com.newstep.solid.netio.MessageListener
and a com.newstep.solid.netio.CommChannelStateListener.
These may be assigned by the openChannel(...) function. Please check the
docs for further details.
In order to maintain the transport protocol abstraction, the SlipAccessPoint
leverages the underlying transport protocol access point whose factory class
MUST be defined in the SlipAccessPointConfig.
In order to avoid exposing the newConnection(...) function to its
clients, the SlipAccessPoint leverages the SlipTranConnListener to handle
new connections from the transport layer. This encapsulation also helps to
associate the channel with the local endpoint on which it was connected.
| Field Summary |
String |
|
protected Collection |
|
protected ReentrantLock |
|
protected final static String |
|
protected static Logger |
|
private String |
|
|
|
protected HashMap |
|
|
|
| Constructor Summary |
protected void |
|
| Method Summary |
protected void |
|
protected void |
|
|
|
|
|
public String |
|
public void |
|
|
|
|
|
|
|
public void |
|
protected Collection channels
The collection of active SlipChannels
Multiplicity:
1
protected ReentrantLock channelsLock
A concurrecy lock for channels Collection access
Multiplicity:
1
protected final static String className
The fully qualified SlipAccessPoint class name used for logging
Final.
Multiplicity:
1
Static.
protected static Logger logger
The access point logger
Multiplicity:
1
Static.
String name
private String name
Multiplicity:
1
Multiplicity:
1
protected HashMap transConnListeners
A collection of transport connection listeners mapped by
their associated end points
Multiplicity:
1
The access point for the associated transport channels
Multiplicity:
1
Creates a new slip access point with the specified name and configuration
Parameters:
name The name for the new SlipAccessPoint
config The configuration of the new SlipAccessPoint
Stereotype:
create
Adds the specified channel to the channels collection
Parameters:
slipChannel The channel to be added to the access point
Notifies the access point of the channel closure
Parameters:
slipChannel The closed channel
Return:
The access point config
Destringifies an endpoint reference
Parameters:
text A stringified endpoint descriptor
Return:
A ChannelEndpoint based on the stringified parameter
Throws:
IOException
public String getName ()
Gets the name of the slip access point.
Return:
The name of the slip access point
Throws:
IOException
Opens a client SlipChannel instance to the specified end point
Parameters:
remoteEndpoint The remote endpoint to connect the channel
NOTE: for SlipChannels the remote end point type must match the
underlying transport type used by the channel.
dataListener The listener entity for the new channel
NOTE: for SlipChannels the listener MUST be a MessageListener
Return:
An open SlipChannel in the CONNECTED state
Throws:
IOException
Blocking call to get an open channel does not assign the channel listener.
This must be done on the returned CommChannel in the same thread as the return
Parameters:
remoteEndpoint the remote end point
NOTE: for SlipChannels the remote end point type must match the
underlying transport type used by the channel.
timeout The duration in seconds after which the access point should
timeout if no channel has been openned
Return:
An open comm channel/slip channel in the CONNECTED state
Throws:
IOException
Opens a SlipChannel asynchronously with the specified state listener
assigned to receive the channel status updates.
Parameters:
remoteEndpoint The remote endpoint
NOTE: for SlipChannels the remote end point type must match the
underlying transport type used by the channel.
channelStateListener The entity to be assigned as the new
channel's state listener during the asynchronous channel opening
Throws:
IOException
Stops the access point from listening on the specified local end point
Parameters:
localEndpoint The local end point on which to stop listening
| | | | SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
|
|