org.ow2.orchestra.pvm.internal.wire.operation
Class MethodInvokerListener
java.lang.Object
org.ow2.orchestra.pvm.internal.wire.operation.MethodInvokerListener
- All Implemented Interfaces:
- Serializable, Listener
public class MethodInvokerListener
- extends Object
- implements Listener, Serializable
Wrapper for the subscribe operation. This class will be used to call a
specified method on reception of an event. This class is used so that a non
Listener class can subscribe to an Observable object.
- Author:
- Tom Baeyens, Guillaume Porcher (Documentation)
- See Also:
SubscribeOperation,
Serialized Form
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MethodInvokerListener
public MethodInvokerListener(String methodName,
List<ArgDescriptor> argDescriptors,
WireContext wireContext,
Object target)
- Creates a new Wrapper. When an event is received, the arguments
args are created from the list argDescriptors,
and target.methodName(args) is called.
- Parameters:
methodName - name of the method to call when an event is received.argDescriptors - list of descriptors of arguments given to the method.wireContext - context to use to create the argumentstarget - object on which the method will be called.
event
public void event(Object source,
String eventName,
Object info)
- Description copied from interface:
Listener
- is called by the
Observable when an event is fired.
- Specified by:
event in interface Listener
- Parameters:
source - Observable that fired the event.eventName - name of the event.info - more information about the fired event. See the concrete
observable docs for more information about what information is
provided.
Copyright © 2011 OW2 Consortium. All Rights Reserved.