java.mtsb 
Class Connector

java.lang.Object
  |
  +--java.mtsb.Connector

public abstract class Connector
extends java.lang.Object
implements java.io.Serializable
The connector class is identified by the list of events that it may catch and also by the list of components that it manages. This is a special component that encapsulates a synchronization protocol, so it implements a state transition diagram (STD). Connector class handles the events with the catchEvent() method, that trigger its state transition diagram. The implementation of a connector protocols follows the State pattern, where each state is implemented as a class with a method by each input event.

 
See Also:
Serialized Form

Field Summary
 int ident 
 
 State initialstate 
 
 java.lang.String name 
         
 java.lang.String type 
 
 java.net.URL url 
 
 LocalUSP usp 
 
 
Constructor Summary
Connector(LocalUSP usp, java.lang.String type) 
 
Connector(LocalUSP usp, java.lang.String instancename, java.lang.String type) 
 
Connector(State initialstate, LocalUSP usp, java.lang.String type) 
 
Connector(State initialstate, LocalUSP usp, java.lang.String instancename, java.lang.String type) 
          Constructor of the class. 
Connector(State initialstate, java.lang.String type) 
 
Connector(State initialstate, java.lang.String name, java.lang.String type) 
 
Connector(java.lang.String type) 
           
 
Method Summary
 void bindToUSP(LocalUSP usp) 
 
 void catchEvent(java.mtsb.ClassEvent e) 
          It is invoked by the USP to propagate an event from a component to the connector(s)that handle the event. 
 void finalizeConnector() 
 
 void initConnector() 
 
 void migrate(java.lang.String destinationUSP) 
          This method is invoked by its own when it decides to migrate to another active USP of the running service
 void setInitialState(State s) 
 
 void setInstanceName(java.lang.String name) 
 
 void setLocalUSP(LocalUSP usp) 
 
 void setState(State s) 
 
 void startState() 
          This method runs the initialisation code of each state implemented in the start() method of the State class.
 void unbindToUSP() 
          These methods are invoked when the connector migrates from a USP to another USP
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

type

public java.lang.String type

name

public java.lang.String name

usp

public LocalUSP usp

ident

public int ident

url

public java.net.URL url

initialstate

public State initialstate
Constructor Detail

Connector

public Connector(State initialstate,
                 LocalUSP usp,
                 java.lang.String instancename,
                 java.lang.String type)
          throws java.lang.Exception
Constructor of the class. Instanciates a connector and initalizates the connector ident and the link to the middleware platform. The parameter State sets the initial state of the connector State transition diagram

Connector

public Connector(State initialstate,
                 LocalUSP usp,
                 java.lang.String type)
          throws java.lang.Exception

Connector

public Connector(LocalUSP usp,
                 java.lang.String type)
          throws java.lang.Exception

Connector

public Connector(LocalUSP usp,
                 java.lang.String instancename,
                 java.lang.String type)
          throws java.lang.Exception

Connector

public Connector(State initialstate,
                 java.lang.String type)
          throws java.lang.Exception

Connector

public Connector(java.lang.String type)
          throws java.lang.Exception

Connector

public Connector(State initialstate,
                 java.lang.String name,
                 java.lang.String type)
          throws java.lang.Exception
Method Detail

setInstanceName

public void setInstanceName(java.lang.String name)

initConnector

public void initConnector()

setInitialState

public void setInitialState(State s)

setState

public void setState(State s)

setLocalUSP

public void setLocalUSP(LocalUSP usp)
                 throws java.lang.Exception

migrate

public void migrate(java.lang.String destinationUSP)
This method is invoked by its own when it decides to migrate to another active USP of the running service
 

catchEvent

public void catchEvent(java.mtsb.ClassEvent e)
                throws java.lang.Exception
It is invoked by the USP to propagate an event from a component to the connector(s)that handle the event. The connector invokes the related method on the object that represents its actual state. This method uses the reflect package of Java
 

startState

public void startState()
This method runs the initialisation code of each state implemented in the start() method of the State class.
 

finalizeConnector

public void finalizeConnector()

unbindToUSP

public void unbindToUSP()
These methods are invoked when the connector migrates from a USP to another USP
 

bindToUSP

public void bindToUSP(LocalUSP usp)