aleph.comm
Class CommunicationManager

java.lang.Object
  |
  +--aleph.comm.CommunicationManager
Direct Known Subclasses:
CommunicationManager, CommunicationManager

public abstract class CommunicationManager
extends java.lang.Object

The Communication Manager provides reliable, FIFO, point-to-point communication. It is an abstract class, meaning that the real work is done by a subclass.

See Also:
aleph.Config#communicationManagers

Field Summary
protected static CommunicationManager theManager
          The current communication manager.
 
Constructor Summary
CommunicationManager()
           
 
Method Summary
abstract  void close()
          Shuts down this CommunicationManager
abstract  void flush(Address address)
          Make sure all messages sent to address have been received
abstract  Address getAddress()
           
abstract  Address getConsoleAddress()
          The Console is the target for all I/O.
static CommunicationManager getManager()
           
abstract  Address getParentAddress()
          Every PE has a parent.
abstract  boolean ping(Address address)
          Is this connection still alive?
abstract  void send(Address address, Message message)
          Sends a message
 void send(PE pe, Message message)
          Sends a message
static void setManager(java.lang.String newManager)
          Change communication managers in mid-stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

theManager

protected static CommunicationManager theManager
The current communication manager.
Constructor Detail

CommunicationManager

public CommunicationManager()
Method Detail

getManager

public static CommunicationManager getManager()
Returns:
the current CommunicationManager

setManager

public static void setManager(java.lang.String newManager)
Change communication managers in mid-stream. Applications should probably not call this method.

send

public void send(PE pe,
                 Message message)
          throws java.io.IOException
Sends a message
Parameters:
pe - destination PE
message - what to send

getAddress

public abstract Address getAddress()
Returns:
my address

getConsoleAddress

public abstract Address getConsoleAddress()
The Console is the target for all I/O.
Returns:
the Console's address

getParentAddress

public abstract Address getParentAddress()
Every PE has a parent.
Returns:
Parent's address

send

public abstract void send(Address address,
                          Message message)
                   throws java.io.IOException
Sends a message
Parameters:
address - destination Address
message - what to send

close

public abstract void close()
Shuts down this CommunicationManager

flush

public abstract void flush(Address address)
                    throws java.io.InterruptedIOException
Make sure all messages sent to address have been received
Parameters:
address - connection to flush

ping

public abstract boolean ping(Address address)
Is this connection still alive?
Parameters:
address - connection to test