|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--info.jedi.net.RMCCall
This class encapsulates a remote method call in the JEDI system. It is principly concerned with writing the data for a remote call to the network; but it also provides infrastructure for actually executing the call on the remote system using class Remote.
RMCHandler
,
Remote
Constructor Summary | |
RMCCall(MailDaemon md,
java.net.InetAddress address,
int port,
java.lang.String objectName,
java.lang.String methodName,
java.util.Vector args,
int timeout)
Creates a RMCCall object representing a remote method call. |
|
RMCCall(MailDaemon md,
InputPacket packet)
Creates a RMCCall object from a JEDI InputPacket. |
Method Summary | |
void |
execute()
Finds the object the method will be called on in the local repository, executes it, catches any exception thrown, and stores the result or exception in internal variables so they can be sent back to the caller. |
java.lang.Object |
getResponse()
Waits on the socket associated with this method call for a packet that contains a response to this method call. |
void |
readResponse(InputPacket packet)
This is called when a RMC reply packet comes in that has the return value for this call. |
void |
reportError(java.lang.Exception e)
This is called when there is an error (usually a timeout) sending this RMCCall. |
void |
respond()
Responds to the calling host by packing up the return value or exception and replying to the socket that send the request |
void |
send()
Sends this RMCCall to the remote machine where it will be executed. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public RMCCall(MailDaemon md, java.net.InetAddress address, int port, java.lang.String objectName, java.lang.String methodName, java.util.Vector args, int timeout)
md
- the MailDaemon to send the call fromaddress
- the host where the remote object isaddress
- the port where the remote object isobjectName
- the name the remote object is
registered under
(see info.jedi.Registry)methodName
- the method to callargs
- the arguments to the call (in order). ints
and booleans and the like should be packed in
wrapper classes like Integer and Boolean.public RMCCall(MailDaemon md, InputPacket packet) throws java.io.IOException
md
- the MailDaemon this RMCCall came in on.packet
- the packet with the method call dataMethod Detail |
public void send() throws java.io.IOException, java.lang.InterruptedException
public void reportError(java.lang.Exception e)
e
- the error conditionpublic void readResponse(InputPacket packet) throws java.io.IOException
packet
- the InputPacket that this method will
read the return value frompublic java.lang.Object getResponse() throws java.lang.Exception
public void execute()
Repository
,
Remote
public void respond() throws java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |