edu.UCL.xmiddle.framework.lib.protocols
Class Protocol

java.lang.Object
  |
  +--edu.UCL.xmiddle.framework.lib.protocols.Protocol
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
Linking, Reconciliation

public abstract class Protocol
extends java.lang.Object
implements java.io.Serializable

Protocol.java This is the basic class which all xmiddle protocols are expected to extend. All protocols are managed by ProtocolChooser, and have a unique session ID, negotiated by protocol chooser. Protocol sessions can either be ACTIVE or PASSIVE; an active protocol session is the one that first sends information; The passive session waits for information first. The ProtocolChooser decides which session is active and which is passive. Created: Fri Jul 20 16:10:46 2001

See Also:
Serialized Form

Field Summary
static boolean ACTIVE
          Denotes an active session
protected  Listener listener
          Used to receive information from the remote host(s) involved in this protocol session
protected  java.lang.String name
          The protocol's name
static boolean PASSIVE
          Denotes a passive session
protected  java.lang.Object remoteID
          The primary ID(s) of the remote host(s) involved in this operation
protected  Sender sender
          Used to send information to the remote host(s) involved in this protocol session
protected  java.lang.Object sessionID
          The unique protocol session ID
 
Constructor Summary
Protocol()
           
 
Method Summary
abstract  void abort()
          Aborts the protocol's execution (in case of network disconnection for example)
abstract  void execute()
          Starts the protocol execution
 java.lang.String getName()
          Returns the protocol's name
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

listener

protected Listener listener
Used to receive information from the remote host(s) involved in this protocol session


sender

protected Sender sender
Used to send information to the remote host(s) involved in this protocol session


name

protected java.lang.String name
The protocol's name


sessionID

protected java.lang.Object sessionID
The unique protocol session ID


remoteID

protected java.lang.Object remoteID
The primary ID(s) of the remote host(s) involved in this operation


ACTIVE

public static boolean ACTIVE
Denotes an active session


PASSIVE

public static boolean PASSIVE
Denotes a passive session

Constructor Detail

Protocol

public Protocol()
Method Detail

getName

public java.lang.String getName()
Returns the protocol's name

Returns:
The protocol's name

abort

public abstract void abort()
Aborts the protocol's execution (in case of network disconnection for example)


execute

public abstract void execute()
Starts the protocol execution