All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface semper.comm.ComPoint

public interface ComPoint
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 getLocalAddress()
Returns the local address.
 o getProtocol()
Returns the protocol.
 o getRemoteAddress()
Returns the remote address; Note: returned address is as canonical/portable as possible; e.g it doesn't necessarily match the address used to generate the ComPoint and returned through getAddress Note: the remote address is not garantueed to be the correct one ! firewalls/proxies can result in a address which is not really the address of the original originator and doesn't allow a callback.
 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 toString()
Creates an string representation of the ComPoint.
 o write(Serializable)
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 The possible values for type are sepcified in ComPointConstants by constants with prefix COMPOINT_.
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 getRemoteAddress
 public abstract ComPointAddress getRemoteAddress()
Returns the remote address; Note: returned address is as canonical/portable as possible; e.g it doesn't necessarily match the address used to generate the ComPoint and returned through getAddress Note: the remote address is not garantueed to be the correct one ! firewalls/proxies can result in a address which is not really the address of the original originator and doesn't allow a callback. In most cases though such situations anyway don't allow any callback ...

 o getLocalAddress
 public abstract ComPointAddress getLocalAddress()
Returns the local address. Note: returned address is as canonical/portable as possible; e.g it doesn't necessarily match the address used to generate the ComPoint and returned through getAddress

 o write
 public abstract void write(Serializable 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 Serializable 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.
 o toString
 public abstract String toString()
Creates an string representation of the ComPoint.

Overrides:
toString in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index