Package edu.rit.pj.cluster
Class Proxy
java.lang.Object
edu.rit.pj.cluster.Proxy
- Direct Known Subclasses:
 JobBackendProxy,JobFrontendProxy,JobSchedulerProxy
Class Proxy is the abstract base class for a proxy object for sending
 messages to a PJ process.
- Version:
 - 20-Nov-2006
 - Author:
 - Alan Kaminsky
 
- 
Constructor Summary
ConstructorsConstructorDescriptionProxy(ChannelGroup theChannelGroup, Channel theChannel) Construct a new proxy. - 
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close communication with this proxy's far end process.Receive a message from this proxy's far end process.Receive a message with the given tag from this proxy's far end process.voidSend a message with the given tag and items to this proxy's far end process.voidSend the given message to this proxy's far end process. 
- 
Constructor Details
- 
Proxy
Construct a new proxy. The proxy will use the given channel in the given channel group to send messages to the far end process.- Parameters:
 theChannelGroup- Channel group.theChannel- Channel.
 
 - 
 - 
Method Details
- 
send
Send the given message to this proxy's far end process.- Parameters:
 theMessage- Message.- Throws:
 IOException- Thrown if an I/O error occurred.IOException- if any.
 - 
send
Send a message with the given tag and items to this proxy's far end process.- Parameters:
 theTag- Message tag.theSrc- Item source buffer.- Throws:
 IOException- Thrown if an I/O error occurred.IOException- if any.
 - 
receive
Receive a message from this proxy's far end process. A message will be received from this proxy's channel in this proxy's channel group. The message must have a tag of 0. The message items are stored in the given item destination buffer.The
receive()method does not return until the message has been fully received.- Parameters:
 theDst- Item destination buffer.- Returns:
 - Status object giving the outcome of the message reception.
 - Throws:
 IOException- Thrown if an I/O error occurred.IOException- if any.
 - 
receive
Receive a message with the given tag from this proxy's far end process. A message will be received from this proxy's channel in this proxy's channel group. IftheTagis null, a message will be received with any tag. The message items are stored in the given item destination buffer.The
receive()method does not return until the message has been fully received.- Parameters:
 theTag- Message tag, or null to receive any tag.theDst- Item destination buffer.- Returns:
 - Status object giving the outcome of the message reception.
 - Throws:
 IOException- Thrown if an I/O error occurred.IOException- if any.
 - 
close
public void close()Close communication with this proxy's far end process. 
 -