com.cloudtran.replicator.link
Class SocketProviderClient

java.lang.Object
  extended by com.cloudtran.replicator.link.AbstractLinkProvider
      extended by com.cloudtran.replicator.link.SocketProviderBase
          extended by com.cloudtran.replicator.link.SocketProviderClient
All Implemented Interfaces:
LinkProvider

public class SocketProviderClient
extends SocketProviderBase

This class is created to provide a client LinkProvider via TCP Sockets.


Constructor Summary
SocketProviderClient(String remoteDataCenterName, InetAddress inetAddress, int port)
           
 
Method Summary
 void connect()
          This call is issued at start of day or after a crash on the other side causes our link to go down.
 void reset()
          This method is called when we're doomed, link-wise.
 
Methods inherited from class com.cloudtran.replicator.link.SocketProviderBase
receiveBytes, sendBytes, toString
 
Methods inherited from class com.cloudtran.replicator.link.AbstractLinkProvider
deserialize, getLocalDataCentreName, getRemoteDataCentreName, serialize, setLink, signalL2Connected, test
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SocketProviderClient

public SocketProviderClient(String remoteDataCenterName,
                            InetAddress inetAddress,
                            int port)
Method Detail

reset

public void reset()
Description copied from class: SocketProviderBase
This method is called when we're doomed, link-wise. We need to signal the Link that we are down and shut up shop.

Specified by:
reset in interface LinkProvider
Overrides:
reset in class SocketProviderBase

connect

public void connect()
Description copied from interface: LinkProvider
This call is issued at start of day or after a crash on the other side causes our link to go down. This is executed synchronously by the DCConnection. The LinkProvider should normally poll the connection on an asynchronous thread, because the connection establishment at one end must wait for the other data center to start. When the link is connected, the provider signals back to the link's signalL2Connected() method, which the sends 'prod_L2UP' into the DCconnection FSM.