All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class magician.Four11.Four11Stub

java.lang.Object
   |
   +----magician.Four11.Four11Stub

public class Four11Stub
extends Object
The Four11Stub class is used by a client wishing to obtain information from the Four11 server. See the description of the Four11 class for an example of its use.

See Also:
Four11

Constructor Index

 o Four11Stub()
Default constructor reads configuration file "Four11.conf" to obtain name of the machine hosting the Four11 server and the port it listens to.
 o Four11Stub(String, int)
Use this constructor to use a Four11 server not written in the configuration file.

Method Index

 o getID()
returns connection identifier for active node
 o send(String)
sends the request to the Four11 server.
 o sendBye(String)
sends a message to the Four11 server.

Constructors

 o Four11Stub
 public Four11Stub()
Default constructor reads configuration file "Four11.conf" to obtain name of the machine hosting the Four11 server and the port it listens to.

 o Four11Stub
 public Four11Stub(String newServer,
                   int newPort)
Use this constructor to use a Four11 server not written in the configuration file.

Parameters:
newServer - a String containing the fully qualified name of the host
newPort - the new port to be used

Methods

 o getID
 public int getID()
returns connection identifier for active node

Returns:
the connection identifier
 o send
 public String send(String message)
sends the request to the Four11 server. The client is expected to wait for the reply.

Parameters:
message - the request
Returns:
the reply string
 o sendBye
 public synchronized void sendBye(String message)
sends a message to the Four11 server. No reply is returned and the client is not expected to be waiting.

Parameters:
message - to send

All Packages  Class Hierarchy  This Package  Previous  Next  Index
1