|
Cliser | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--cliser.CommunicatorUser | +--cliser.Client
Client provides an abstract class for storing attributes common to all kinds of clients.
See the constructor for the specific attributes.
Constructor Summary | |
Client(java.lang.String service,
java.lang.String remoteHost,
int port)
Explicit-value constructor. |
Method Summary | |
int |
getPort()
Access myPort attribute. |
java.lang.String |
getServer()
Access myServer attribute. |
java.lang.String |
getService()
Access myService attribute. |
abstract void |
interactWithServer()
What the client does in interacting with its server (abstract). |
void |
run()
What the client does during its lifetime. |
Methods inherited from class cliser.CommunicatorUser |
getCommunicator,
initCommunicator,
receive,
send,
setCommunicator |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public Client(java.lang.String service, java.lang.String remoteHost, int port)
service,
- a String naming my serviceremoteHost,
- a String naming my remote hostport,
- an int specifying the port I will use
POST: my instance variables have been initialized:
myService == service
&& myServer == remoteHost
&& myPort == port
&& myCommunicator has been initialized by a subclass
via polymorphic initCommunicator.CommunicatorUser
Method Detail |
public void run()
PRE: myCommunicator has been initialized for my server.
POST: I have interacted with my server.
public abstract void interactWithServer()
PRE: myCommunicator has been initialized for my server.
POST: I have finished interacting with my server.
public final java.lang.String getService()
public final java.lang.String getServer()
public final int getPort()
|
Cliser | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |