fulmine.rpc.events
Class RpcInvokeEvent

java.lang.Object
  extended by fulmine.event.AbstractEvent
      extended by fulmine.event.system.AbstractSystemEvent
          extended by fulmine.rpc.events.RpcInvokeEvent
All Implemented Interfaces:
IEvent, ISystemEvent, IAddressable, IDescriptor, Cloneable

public final class RpcInvokeEvent
extends AbstractSystemEvent

Raised in a receiving context when an RPC is invoked from a remote context. The event has the RPC key that identifies the RPC to invoke and the arguments.

This event differs from SendRpcEvent in that this event is raised in the receiving context and encapsulates the action to actually execute the RPC.

Author:
Ramon Servadei

Constructor Summary
RpcInvokeEvent(IEventManager context, byte[] rpcData)
          Constructor for the event
 
Method Summary
 void decode(IRpcRegistry registry)
          Decode the byte buffer into the RPC key and the arguments for the RPC
protected  String getAdditionalToString()
          Delegate method for subclasses to provide additional toString information.
 IField[] getArguments()
          Get the arguments for the RPC invocation.
 IRpcMarker getMarker()
          Get the RPC marker for the RPC invocation.
 String getRemoteContextIdentity()
          Get the remote context identity
 String getRpcKey()
          Get the RPC key identifying the RpcDefinition this invocation is for
 
Methods inherited from class fulmine.event.system.AbstractSystemEvent
hideSourceFromToString
 
Methods inherited from class fulmine.event.AbstractEvent
clone, equals, getAddress, getDomain, getDrivingFrame, getFrame, getIdentity, getSource, getTriggerEvent, getType, hashCode, setAddress, setDrivingFrame, setFrame, setSource, setTriggerEvent, toDetailedString, toIdentityString, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface fulmine.event.IEvent
clone, getDrivingFrame, getFrame, getSource, getTriggerEvent, setTriggerEvent
 
Methods inherited from interface fulmine.IDescriptor
toDetailedString, toIdentityString
 
Methods inherited from interface fulmine.IAddressable
getAddress, getDomain, getIdentity, getType
 

Constructor Detail

RpcInvokeEvent

public RpcInvokeEvent(IEventManager context,
                      byte[] rpcData)
Constructor for the event

Parameters:
context - the local context
rpcData - the data for the event, this includes the RPC key, argument data and RPC marker ID
Method Detail

decode

public void decode(IRpcRegistry registry)
Decode the byte buffer into the RPC key and the arguments for the RPC

Parameters:
registry - the RPC registry used to lookup the IRpcDefinition for the RPC invocation.

getRemoteContextIdentity

public String getRemoteContextIdentity()
Get the remote context identity

Returns:
the identity of the remote context invoking the RPC

getRpcKey

public String getRpcKey()
Get the RPC key identifying the RpcDefinition this invocation is for

Returns:
the RPC key identifying the RpcDefinition this invocation is for

getArguments

public IField[] getArguments()
Get the arguments for the RPC invocation.

Returns:
the arguments for the RPC invocation

getMarker

public IRpcMarker getMarker()
Get the RPC marker for the RPC invocation. This is used by the caller to track the result of the RPC with the invocation.

Returns:
the marker for the RPC

getAdditionalToString

protected String getAdditionalToString()
Description copied from class: AbstractEvent
Delegate method for subclasses to provide additional toString information. This should be a comma separated string, e.g. "one, two, three"

Overrides:
getAdditionalToString in class AbstractSystemEvent
Returns:
the additional toString information in comma separated format


Copyright © 2007-2009. All Rights Reserved.