sub_arctic.input
Class dispatch_result

java.lang.Object
  |
  +--sub_arctic.input.dispatch_result

public class dispatch_result
extends java.lang.Object

This class is used by the dispatch agents to record what happened when they dispatched their event. Whenever an agent successfully dispatches an event it creates a dispatch_result object and this is returned to the agents containing policy. In most cases, the policy simply hands the dispatch_result back to the manager as the return value of dispatching an event.


Field Summary
protected  dispatch_agent _agent
          This is the agent which dispatched the event.
protected  java.lang.Object _agent_data
          This is the agent defined data associated with this dispatch.
protected  event _dispatched_event
          This is the event that was dispatched.
protected  java.lang.reflect.Method _protocol_used
          This is the protocol method by which dispatched to the interactor.
protected  java.lang.Object _recipient
          This is the interactor to whom the input was sent.
 
Constructor Summary
dispatch_result(event e, dispatch_agent a, java.lang.Object i, java.lang.reflect.Method m)
          Create a new dispatch_result with null agent data.
dispatch_result(event e, dispatch_agent a, java.lang.Object i, java.lang.reflect.Method m, java.lang.Object ad)
          Create a new dispatch_result.
 
Method Summary
 java.lang.Object agent_data()
          Return the agent specific data for this dispatch.
 dispatch_agent agent()
          Return the agent who handled the event.
 event dispatched_event()
          Return the event which was dispatched by the agent.
 java.lang.reflect.Method protocol_used()
          Return the input protocol method by which this input was handled.
 java.lang.Object recipient()
          Return the interactor which received the event.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_dispatched_event

protected event _dispatched_event
This is the event that was dispatched.

_agent

protected dispatch_agent _agent
This is the agent which dispatched the event.

_protocol_used

protected java.lang.reflect.Method _protocol_used
This is the protocol method by which dispatched to the interactor.

_recipient

protected java.lang.Object _recipient
This is the interactor to whom the input was sent. If multiple interactors received the event, this will be an array of interactors.

_agent_data

protected java.lang.Object _agent_data
This is the agent defined data associated with this dispatch.
Constructor Detail

dispatch_result

public dispatch_result(event e,
                       dispatch_agent a,
                       java.lang.Object i,
                       java.lang.reflect.Method m)
Create a new dispatch_result with null agent data.
Parameters:
event - e the event which was dispatched
dispatch_agent - a the agent which dispatched the input
Object - i the interactor which received the event (pass an array of interactors if multiple interactors received the event)
Method - m the method that was called to handle the input

dispatch_result

public dispatch_result(event e,
                       dispatch_agent a,
                       java.lang.Object i,
                       java.lang.reflect.Method m,
                       java.lang.Object ad)
Create a new dispatch_result.
Parameters:
event - e the event which was dispatched
dispatch_agent - a the agent which dispatched the input
Object - i the interactor which received the event (pass an array of interactors if multiple interactors received the event)
Method - m the method that was called to handle the input
Object - ad the agent specific data from this dispatch
Method Detail

dispatched_event

public event dispatched_event()
Return the event which was dispatched by the agent.
Returns:
event the dispatched event

agent

public dispatch_agent agent()
Return the agent who handled the event.
Returns:
dispatch_agent the dispatching agent for this result

protocol_used

public java.lang.reflect.Method protocol_used()
Return the input protocol method by which this input was handled.
Returns:
Method a reference to the method through which this input was sent

recipient

public java.lang.Object recipient()
Return the interactor which received the event. If multiple interactors recieved the event, this will be an array of interactors.
Returns:
Object the recipient of the event

agent_data

public java.lang.Object agent_data()
Return the agent specific data for this dispatch.
Returns:
Object some piece of data that is specific to each agent about how this event was dispatched.