org.ow2.bonita.pvm.internal.wire.operation
Class MethodInvokerListener
java.lang.Object
org.ow2.bonita.pvm.internal.wire.operation.MethodInvokerListener
- All Implemented Interfaces:
- java.io.Serializable, Listener
public class MethodInvokerListener
- extends java.lang.Object
- implements Listener, java.io.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
Method Summary |
void |
event(java.lang.Object source,
java.lang.String eventName,
java.lang.Object info)
is called by the Observable when an event is fired. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MethodInvokerListener
public MethodInvokerListener(java.lang.String methodName,
java.util.List<ArgDescriptor> argDescriptors,
WireContext wireContext,
java.lang.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(java.lang.Object source,
java.lang.String eventName,
java.lang.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 © 2009 OW2 Consortium. All Rights Reserved.