com.neeve.emx
Interface IEmxAction<E,V>


public interface IEmxAction<E,V>

Represents an EMX action.

This interface represents an EMX action and should be implemented by any action that needs to be invoked via the EmxActionExecutor.

Threading:
EMX actions are always invoked by the owner thread of the dispatcher in whose context the action is executed.

Method Summary
 V execute(IEmxDispatcher dispatcher, E object)
          The action endpoint method.
 

Method Detail

execute

V execute(IEmxDispatcher dispatcher,
          E object)
          throws Exception
The action endpoint method.

Parameters:
dispatcher - The dispatcher in whose context this method is invoked.
object - The object passed in to EmxActionExecutor.invoke(com.neeve.emx.IEmxDispatcher, com.neeve.emx.IEmxAction, E, int).
Returns:
An opaque object that is to be returned to the invoker of the action. This object will be discarded if the invoker has not requested for synchronous action execution.
Throws:
Exception - If the user has requested for a synchronous action when invoking EmxActionExecutor.invoke(com.neeve.emx.IEmxDispatcher, com.neeve.emx.IEmxAction, E, int), the invoke method will return with this exception.

This serves as the entry point for actions that are executed via the EmxActionExecutor. The EmxActionExecutor invokes this method to run the action.

Threading:
This method is always invoked in the context of the owner thread of the dispatcher in whose context the action is to be executed.


Copyright © 2015 Neeve Research, LLC. All Rights Reserved.