Class ResponderImp
java.lang.Object
java.rmi.server.RemoteObject
java.rmi.server.RemoteServer
java.rmi.server.UnicastRemoteObject
ResponderImp
- All Implemented Interfaces:
- java.io.Serializable, java.rmi.Remote, Responder
public class ResponderImp
- extends java.rmi.server.UnicastRemoteObject
- implements Responder
- Author:
- Ariel Cohen
- See Also:
- Serialized Form
|
Constructor Summary |
ResponderImp(java.lang.String myName)
Constructor for the ResponderImp. |
|
Method Summary |
void |
initiateConversationWithResponder(java.lang.String initiatorName,
java.lang.String initiatorHost,
java.lang.String message)
Initiates a conversation with the Responder who replies to it |
static void |
main(java.lang.String[] args)
Excutes the Responder. |
| Methods inherited from class java.rmi.server.UnicastRemoteObject |
clone, exportObject, exportObject, exportObject, unexportObject |
| Methods inherited from class java.rmi.server.RemoteServer |
getClientHost, getLog, setLog |
| Methods inherited from class java.rmi.server.RemoteObject |
equals, getRef, hashCode, toString, toStub |
| Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
ResponderImp
public ResponderImp(java.lang.String myName)
throws java.rmi.RemoteException
- Constructor for the ResponderImp.
- Parameters:
myName - The Responder's name
- Throws:
java.rmi.RemoteException - There is no RMI.
initiateConversationWithResponder
public void initiateConversationWithResponder(java.lang.String initiatorName,
java.lang.String initiatorHost,
java.lang.String message)
throws java.rmi.RemoteException
- Initiates a conversation with the Responder who replies to it
- Specified by:
initiateConversationWithResponder in interface Responder
- Parameters:
initiatorName - The Initiator's nameinitiatorHost - The Initiator's hostmessage - The first message
- Throws:
java.rmi.RemoteException - There is no RMI connection
main
public static void main(java.lang.String[] args)
- Excutes the Responder.
- Parameters:
args - An array of Responder's name, Responder's host