Package com.gigaspaces.events
Interface DataEventSession
- All Superinterfaces:
EventSession
- All Known Implementing Classes:
AbstractDataEventSession,DefaultDataEventSession,DurableUnicastDelegatorSession
The common interface that is used when working with data events.
listeners can be registered using the addListener() methods and receive
an EventRegistration that will be used to unregister using the removeListener().
listeners can be registered using the addListener() methods and receive
an EventRegistration that will be used to unregister using the removeListener().
- Since:
- 6.0
- Version:
- 1.0
- Author:
- asy ronen
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionaddListener(Object template, RemoteEventListener listener) Registers a listener with a space using a POJO template.addListener(Object template, RemoteEventListener listener, long lease, NotifyActionType actionTypes) Deprecated.Since 9.7addListener(Object template, RemoteEventListener listener, long lease, MarshalledObject handback, INotifyDelegatorFilter filter, NotifyActionType actionTypes) Deprecated.Since 9.7addListener(Object template, RemoteEventListener listener, NotifyActionType actionTypes) Registers a listener with a space using a POJO templateaddListener(Object template, RemoteEventListener listener, NotifyActionType actionTypes, MarshalledObject handback, INotifyDelegatorFilter filter) Registers a listener with a space using a POJO templatevoidremoveListener(EventRegistration registration) Unregisters the listener from the space.Methods inherited from interface com.gigaspaces.events.EventSession
close, getSessionConfig, getSpace
-
Method Details
-
addListener
Registers a listener with a space using a POJO template. Equals to addListener( template, listener, Lease.FOREVER, NotifyActionType.NOTIFY_ALL)- Parameters:
template- the template to be match with.listener- the listener- Returns:
- the EventRegistration object.
- Throws:
RemoteException- if the space has failed to perform the registration
-
addListener
EventRegistration addListener(Object template, RemoteEventListener listener, NotifyActionType actionTypes) throws RemoteException Registers a listener with a space using a POJO template- Parameters:
template- the template to be match with.listener- the listeneractionTypes- the type of actions you wish to receive notification on.- Returns:
- the EventRegistration object.
- Throws:
RemoteException- if the space has failed to perform the registration
-
addListener
EventRegistration addListener(Object template, RemoteEventListener listener, NotifyActionType actionTypes, MarshalledObject handback, INotifyDelegatorFilter filter) throws RemoteException Registers a listener with a space using a POJO template- Parameters:
template- the template to be match with.listener- the listeneractionTypes- the type of actions you wish to receive notification on.handback- an object that will be passed back to the listener when notified.filter- a server-side filter to filter out notifications.- Returns:
- the EventRegistration object.
- Throws:
RemoteException- if the space has failed to perform the registration
-
addListener
@Deprecated EventRegistration addListener(Object template, RemoteEventListener listener, long lease, NotifyActionType actionTypes) throws RemoteException Deprecated.Since 9.7Data event registration with custom lease is deprecated - useaddListener(Object, net.jini.core.event.RemoteEventListener, NotifyActionType)instead.- Throws:
RemoteException
-
addListener
@Deprecated EventRegistration addListener(Object template, RemoteEventListener listener, long lease, MarshalledObject handback, INotifyDelegatorFilter filter, NotifyActionType actionTypes) throws RemoteException Deprecated.Since 9.7Data event registration with custom lease is deprecated - useaddListener(Object, net.jini.core.event.RemoteEventListener, NotifyActionType, java.rmi.MarshalledObject, com.j_spaces.core.client.INotifyDelegatorFilter)instead.- Throws:
RemoteException
-
removeListener
Unregisters the listener from the space.- Parameters:
registration- the registration object received from the server when the listener was added.- Throws:
RemoteException- if the space has failed to unregister the listener.UnknownLeaseException- if the lease of the registration is invalid.
-