Interface semper.comm.ComPoint
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface semper.comm.ComPoint

public interface ComPoint
extends Object
extends ComPointConstants
This abstract class defines the generic interface to the communication modules. It is subclassed to provide an actual implementation, such as ComPointTCP.
Version:
beta-4, 12.8.96
Author:
Mehdi Nassehi

Method Index

 o accept()
Waits for and returns a Responder ComPoint when a message arrives.
 o close()
Closes the ComPoint.
 o comPoint(int, ComPointAddress)
Creates an initiator or server ComPoint.
 o getAddress()
If the ComPoint is an Initiator, Returns the remote address; if it is a Server, Returns the local address.
 o getProtocol()
Returns the protocol.
 o getType()
Returns the type.
 o read()
Waits for and returns a message received on the ComPoint, which must be either an Initiator or a Responder.
 o write(Object)
Sends the message through the ComPoint, which must be either an Initiator or a Responder.

Methods

 o comPoint
  public abstract ComPoint comPoint(int type,
                                    ComPointAddress address) throws ComPointException
Creates an initiator or server ComPoint.
Parameters:
type - type of ComPoint to be created
address - if the type is server, the local address; otherwise, the remote address
Throws: ComPointException
if type is invalid or the socket cannot be opened.
 o getProtocol
  public abstract String getProtocol()
Returns the protocol.
 o getType
  public abstract int getType()
Returns the type.
 o getAddress
  public abstract ComPointAddress getAddress()
If the ComPoint is an Initiator, Returns the remote address; if it is a Server, Returns the local address.
 o write
  public abstract void write(Object message) throws ComPointException
Sends the message through the ComPoint, which must be either an Initiator or a Responder.
Parameters:
message - message to be sent
Throws: ComPointException
if the type is invalid or encountered an error while externalizing the message.
 o read
  public abstract Object read() throws ComPointException
Waits for and returns a message received on the ComPoint, which must be either an Initiator or a Responder.
Throws: ComPointException
if the type is invalid or encountered an error while internalizing the message.
 o accept
  public abstract ComPoint accept() throws ComPointException
Waits for and returns a Responder ComPoint when a message arrives. Must be invoked on a ComPoint of type Server.
Throws: ComPointException
if the type is invalid or encountered an error while accepting a new socket.
 o close
  public abstract void close() throws ComPointException
Closes the ComPoint.
Throws: ComPointException
if the type is invalid or encountered an error while error while closing the socket.

All Packages  Class Hierarchy  This Package  Previous  Next  Index