| | | | SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
|
|
com.newstep.solid.comm.rtt
|
|
+--com.newstep.solid.comm.rtt.RttChannel
public class RttChannel
The RttChannel is the RTT implementation of a channel. An Rtt channel can be
of a Server type or a Client type. When Server, it gets created when a
connection is accepted . When Client, it gets created at the client
application's request which has to supply the host it's connecting to and an
unigue client ID. The client application has to register a channel status
listener for this Rtt channel in order to get notified when the channel has
actually connected and it can be used for read/writes. In both cases the
application has to register a channel listener of this Rtt channel in order
to receive messages sent through the channel.
Implements:
ChannelStatusListener
TimerListener
Links:
Kernel Association Association Link
Associates type:
association
Client cardinality:
1..*
Client navigability:
NOT NAVIGABLE
Client visibility:
private
Directed.
Supplier cardinality:
1
Supplier navigability:
NAVIGABLE
Supplier visibility:
private
Custom properties
associates:
RttChannelFactory
Kernel Association Association Link
Associates type:
aggregationByValue
Client cardinality:
1
Client navigability:
NOT NAVIGABLE
Client visibility:
private
Supplier cardinality:
0..1
Supplier navigability:
NAVIGABLE
Supplier visibility:
private
Custom properties
link:
aggregationByValue
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
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
Implementation Implementation Link
The RttChannel is the RTT implementation of a channel. An Rtt channel can be
of a Server type or a Client type. When Server, it gets created when a
connection is accepted . When Client, it gets created at the client
application's request which has to supply the host it's connecting to and an
unigue client ID. The client application has to register a channel status
listener for this Rtt channel in order to get notified when the channel has
actually connected and it can be used for read/writes. In both cases the
application has to register a channel listener of this Rtt channel in order
to receive messages sent through the channel.
Implementation Implementation Link
The RttChannel is the RTT implementation of a channel. An Rtt channel can be
of a Server type or a Client type. When Server, it gets created when a
connection is accepted . When Client, it gets created at the client
application's request which has to supply the host it's connecting to and an
unigue client ID. The client application has to register a channel status
listener for this Rtt channel in order to get notified when the channel has
actually connected and it can be used for read/writes. In both cases the
application has to register a channel listener of this Rtt channel in order
to receive messages sent through the channel.
Generalization Generalization Link
The RttChannel is the RTT implementation of a channel. An Rtt channel can be
of a Server type or a Client type. When Server, it gets created when a
connection is accepted . When Client, it gets created at the client
application's request which has to supply the host it's connecting to and an
unigue client ID. The client application has to register a channel status
listener for this Rtt channel in order to get notified when the channel has
actually connected and it can be used for read/writes. In both cases the
application has to register a channel listener of this Rtt channel in order
to receive messages sent through the channel.
| Nested Class Summary |
public Static class |
RttState |
| Field Summary |
int |
|
RttState |
|
|
|
private String |
|
private static String |
|
private long |
|
private boolean |
|
private int |
|
private RttState |
|
public static int |
|
private int |
|
|
|
|
|
|
|
RttState |
CLOSING |
RttState |
ERROR |
RttState |
EXTRA |
RttState |
IDENT |
RttState |
NONE |
RttState |
OPEN |
RttState |
REDUNDANT |
|
|
| Constructor Summary |
public void |
|
| Method Summary |
public void |
|
public void |
|
public void |
|
public int |
|
public RttState |
|
|
|
public String |
|
public int |
|
|
|
|
|
|
|
public boolean |
|
public void |
|
public void |
|
private void |
|
private void |
|
private void |
|
private void |
|
public void |
|
public void |
|
public void |
|
public void |
|
public void |
|
public void |
|
public void |
|
public void |
|
public String |
|
public void |
|
private String channelName
Multiplicity:
1
private static String className
Multiplicity:
1
Static.
private long DELAY
Multiplicity:
1
private boolean enabled
Multiplicity:
1
private int hostId
Multiplicity:
1
int hostId
RttState internalState
private RttState internalState
Multiplicity:
1
public static int nextId
Multiplicity:
1
Static.
private int partnerID
Multiplicity:
1
Multiplicity:
1
Custom properties
associates:
RttChannelFactory
Multiplicity:
1
Multiplicity:
1
Multiplicity:
1
Constructor
Parameters:
subChannel
protocolFactory
Stereotype:
create
public void close ()
Channel Interface . Closes the channel
Throws:
ChannelException
public void disable ()
Disables the RttChannel Sends a disable message to the server
public void enable ()
Enables the RttChannel . Sends an enable message to the server
public int getHostId ()
Returns the ID of this channel
Return:
int
public RttState getInternalState ()
Return a Host
public String getName ()
public int getPartnerId ()
Returns the partner ID of this channel
Return:
TODO
Returns the redundant element of this channel. Used by the factory
Return:
ProtocolElement
Return a Host
public boolean isEnabled ()
Returns the enabled status of the channel
public void onMessage (Message message)
ChannelListener Interface. Call back function for receiving a message.
public void open ()
Channel Interface. Opens the channel
Throws:
ChannelException
private void sendDisableMessage ()
Sends the DISABLE message
private void sendEnableMessage ()
Sends the ENABLE message.
private void sendExtraIdMessage ()
This message is sent when the channel becomes REDUNDANT.
Throws:
ChannelException
private void sendFirstIdMessage ()
Sends the ID_NEW message.
Throws:
ChannelException
public void setHostId (Integer hostId)
Assigns the id of this channel. Has to be unique for one redundant
channel
Parameters:
hostId
public void setInternalState (RttState internalState)
public void setName (String name)
public void setPartnerId (Integer partnerID)
Assigns the partner ID of this channel
Parameters:
partnerID
Assigns the redundant element of this channel. Used by the factory
Parameters:
red
public void setRole (Type role)
ChannelStatusListener interface. Call back function for changes in status
public void timerExpired ()
TimerListener interface. The channel didn't connect on time; close the
channel and let the application decide what to do next
public String toString ()
String representation of this channel
public void write (Message message)
Channel Interface. Writes a message on the channel. For a DATA messages
it only writes the message if the channel is enabled. Use isEnabled() to
ckeck for the enabled status
Throws:
ChannelException
| | | | SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
|
|