Class
Tree
          
SUMMARY: INNER | FIELD | CONSTR | METHODDETAIL: FIELD | CONSTR | METHOD
 

com.newstep.solid.netio.rtt
Class RttAccessPoint
com.newstep.solid.netio.AccessPoint
  |
  +--com.newstep.solid.netio.rtt.RttAccessPoint

public class RttAccessPoint      
RttAccessPoint provides access to RttChannels. Fully implements AccessPoint interface
 
Links:
Kernel Association Association Link
to Class TcpStreamAccessPoint
Associates type:
aggregationByValue
Client cardinality:
1
Client navigability:
NOT NAVIGABLE
Client visibility:
private
Directed.
Supplier cardinality:
1
Supplier navigability:
NAVIGABLE
Supplier visibility:
protected
Custom properties
link:
aggregationByValue
 
Generalization Generalization Link
to Class AccessPoint
RttAccessPoint provides access to RttChannels. Fully implements AccessPoint interface
 
 

Nested Class Summary
class
Field Summary
private String
protected final static String
private final static long
protected HashMap
protected HashMap
protected int
int
TimerTask
TimerTask
ReentrantLock
private HashMap
protected ReentrantLock
protected static Logger
protected HashMap
private Timer
Constructor Summary
protected void
ListeningServer(RttEndpoint endpoint, ConnectionListener listener, Integer count)
void
Method Summary
void
protected boolean
connectChannel(RttClientChannel rc, RttEndpoint remoteEndpoint, MessageListener messageListener)
getEndpoint(String text)
private void
public void
listen(ChannelEndpoint localEndpoint, ConnectionListener connectionListener, Integer numberOfConnections)
private void
protected synchronized void
protected synchronized void
protected void
public void
protected void
protected void
protected void
openChannel(ChannelEndpoint remoteEndpoint, CommChannelStateListener connectionListener)
openChannel(ChannelEndpoint remoteEndpoint, Integer timeout)
openChannel(ChannelEndpoint remoteEndpoint, CommChannelListener dataListener)
void
reConnect(RttChannel channel, TcpStreamChannel tcpChannel, Boolean primary)
private Thread
retryConnection(RttClientChannel channel, TcpChannelEndpoint endpoint, Boolean primary)
void
scheduleHeartbeat(TimerTask tt)
public void
Field Detail
accesPointName
private String accesPointName
Multiplicity:
1
 

className
protected final static String className
Final.
Multiplicity:
1
Static.
 

CONNECTION_RETRY_INTERVAL
private final static long CONNECTION_RETRY_INTERVAL
Final.
Multiplicity:
1
Static.
 

establishedChannels
protected HashMap establishedChannels
Multiplicity:
1
 

halfChannels
protected HashMap halfChannels
Multiplicity:
1
 

hostId
protected int hostId
Multiplicity:
1
 

listeningServers
private HashMap listeningServers
Multiplicity:
1
 

lock
protected ReentrantLock lock
Multiplicity:
1
 

logger
protected static Logger logger
Multiplicity:
1
Static.
 

reconnectingChannels
protected HashMap reconnectingChannels
Multiplicity:
1
 

rttTimer
private Timer rttTimer
Multiplicity:
1
 

tcpStreamAccessPoint
protected TcpStreamAccessPoint tcpStreamAccessPoint
Multiplicity:
1
 
Constructor Detail
RttAccessPoint
void RttAccessPoint (String name, ChannelAccessPointConfig capConfig)
 
Stereotype:
create
 
Method Detail
closeChannel
void closeChannel (RttChannel channel)
 
Cleans up the resources after the channel. Invoked from within the RttChannel.close()
Parameters:
channel
the closing channel
 

connectChannel
protected boolean connectChannel (RttClientChannel rc, RttEndpoint remoteEndpoint, MessageListener messageListener)
 
Helper operation used by several openChannel methods to actualy connect the channel after all
the checks have been made
Parameters:
rc
RttClientChannel to connect
remoteEndpoint
where to connect it
messageListener
an optional message listener to be set upon connection
Return:
true for full or partial success, false if both tcp channels failed
 

getEndpoint
public ChannelEndpoint getEndpoint (String text)
 
Throws:
IOException
 

initializeTimer
private void initializeTimer ()
 
Creates a timer and schedules a dummy timer task for immediate execution in order to raise
the priority of the timer thread to its groups max priority
 

listen
public void listen (ChannelEndpoint localEndpoint, ConnectionListener connectionListener, Integer numberOfConnections)
 
Throws:
IOException
 

openChannel
public CommChannel openChannel (ChannelEndpoint remoteEndpoint, CommChannelStateListener connectionListener)
 
Throws:
IOException
 

openChannel
public CommChannel openChannel (ChannelEndpoint remoteEndpoint, Integer timeout)
 
Throws:
IOException
 

openChannel
public CommChannel openChannel (ChannelEndpoint remoteEndpoint, CommChannelListener dataListener)
 
Throws:
IOException
 

reConnect
void reConnect (RttChannel channel, TcpStreamChannel tcpChannel, Boolean primary)
 
Tries to establish a lost connection on one of the redundant tcp channels by either
reconnecting the client channel or starting to listen for connection retry on a server
channel
Parameters:
channel
tcpChannel
primary
 

retryConnection
private Thread retryConnection (RttClientChannel channel, TcpChannelEndpoint endpoint, Boolean primary)
 
Creates a thread which periodically tries to connect the failed tcp channel
Parameters:
channel
RttClientChannel to retry the connection for
endpoint
TcpChannelEndpoint to connect
primary
true if primary tcp channel, false if secondary
 

scheduleHeartbeat
void scheduleHeartbeat (TimerTask tt)
 
Schedules a heartbeat timer task
Parameters:
tt
heartbeat timer task
 

stopListening
public void stopListening (ChannelEndpoint localEndpoint)
 
 

Class
Tree
          
SUMMARY: INNER | FIELD | CONSTR | METHODDETAIL: FIELD | CONSTR | METHOD