edu.vub.at.actors.net.cmd
Class CMDHandshake

java.lang.Object
  extended byedu.vub.at.actors.net.cmd.VMCommand
      extended byedu.vub.at.actors.net.cmd.CMDHandshake
All Implemented Interfaces:
java.io.Serializable

public class CMDHandshake
extends VMCommand

A handshake command is sent when a VM discovers another VM in its environment. It sends its own GUID to the newly discovered VM, which can then add this GUID to its VM address book. SENDER: the discovering VM RECEIVER: the discovered VM MODE: ASYNCHRONOUS, UNICAST PROPERTIES: GUID of sender REPLY: none

Author:
tvcutsem
See Also:
Serialized Form

Field Summary
private  GUID senderVMId_
           
 
Fields inherited from class edu.vub.at.actors.net.cmd.VMCommand
_TRANSMISSION_TIMEOUT_
 
Constructor Summary
CMDHandshake(GUID senderVMId)
           
 
Method Summary
 void send(org.jgroups.blocks.MessageDispatcher dispatcher, org.jgroups.Address recipientVM)
           
 java.lang.Object uponReceiptBy(ELVirtualMachine remoteHost, org.jgroups.Message wrapper)
          To be overridden by subclasses to specify the behaviour to execute upon reception and execution of the command object at the recipient VM.
 
Methods inherited from class edu.vub.at.actors.net.cmd.VMCommand
sendAsyncMulticast, sendAsyncUnicast, sendSynchronousUnicast, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

senderVMId_

private final GUID senderVMId_
Constructor Detail

CMDHandshake

public CMDHandshake(GUID senderVMId)
Method Detail

send

public void send(org.jgroups.blocks.MessageDispatcher dispatcher,
                 org.jgroups.Address recipientVM)

uponReceiptBy

public java.lang.Object uponReceiptBy(ELVirtualMachine remoteHost,
                                      org.jgroups.Message wrapper)
                               throws java.lang.Exception
Description copied from class: VMCommand
To be overridden by subclasses to specify the behaviour to execute upon reception and execution of the command object at the recipient VM. This code is still executed in a JGroups thread!

Specified by:
uponReceiptBy in class VMCommand
Parameters:
remoteHost - the host at which the command arrived and is executed
wrapper - the JGroups message wrapper that was used to transport this command object
Throws:
java.lang.Exception