com.cloudtran.replicator.isolator
Class Link

java.lang.Object
  extended by com.cloudtran.replicator.isolator.Link

public class Link
extends Object

One of these Link objects will be instantiated for each Isolator in the remote data centre. Only one of these should be active at any given time. This class is just a placeholder between the DCConnection and the LinkProvider.


Field Summary
static String CONNECTED
           
static String CONNECTING
           
static String DISCONNECTED
           
 
Constructor Summary
Link(DCConnection dcConnection, LinkProvider linkProvider, int indexNumber)
           
 
Method Summary
 void connect()
          This starts our data thread and tries to connect to the other end on it.
 DCConnection getDcConnection()
           
 int getLinkNumber()
           
 boolean isConnected()
           
 void setDcConnection(DCConnection dcConnection)
           
 void setLinkNumber(int linkNumber)
           
 void signalL2Connected()
          This is called by the LinkProvider.
 void stopConnecting()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DISCONNECTED

public static final String DISCONNECTED
See Also:
Constant Field Values

CONNECTING

public static final String CONNECTING
See Also:
Constant Field Values

CONNECTED

public static final String CONNECTED
See Also:
Constant Field Values
Constructor Detail

Link

public Link(DCConnection dcConnection,
            LinkProvider linkProvider,
            int indexNumber)
Method Detail

toString

public String toString()
Overrides:
toString in class Object

getDcConnection

public DCConnection getDcConnection()

setDcConnection

public void setDcConnection(DCConnection dcConnection)

getLinkNumber

public int getLinkNumber()

setLinkNumber

public void setLinkNumber(int linkNumber)

connect

public void connect()
This starts our data thread and tries to connect to the other end on it. It returns immediately. When it connects


isConnected

public boolean isConnected()

signalL2Connected

public void signalL2Connected()
This is called by the LinkProvider. Change our status and send in the linkUp Prod to the DC.


stopConnecting

public void stopConnecting()