Package com.gigaspaces.events
Class AbstractDataEventSession
java.lang.Object
com.gigaspaces.events.AbstractDataEventSession
- All Implemented Interfaces:
DataEventSession,EventSession
- Direct Known Subclasses:
DefaultDataEventSession,DurableUnicastDelegatorSession
the super class of all DataEventSession implementations.
it supplies an automatic renew service for the listeners.
it supplies an automatic renew service for the listeners.
- Since:
- 6.0
- Version:
- 1.0
- Author:
- asy ronen
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractDataEventSession(IJSpace space, EventSessionConfig config) -
Method Summary
Modifier and TypeMethodDescriptionaddListener(Object template, long lease, NotifyInfo notifyInfo) addListener(Object template, RemoteEventListener listener) Registers a listener with a space using a POJO template.addListener(Object template, RemoteEventListener listener, long lease, NotifyActionType actionTypes) Data event registration with custom lease is deprecated - useDataEventSession.addListener(Object, net.jini.core.event.RemoteEventListener, NotifyActionType)instead.addListener(Object template, RemoteEventListener listener, long lease, MarshalledObject handback, INotifyDelegatorFilter filter, NotifyActionType notifyType) Data event registration with custom lease is deprecated - useDataEventSession.addListener(Object, net.jini.core.event.RemoteEventListener, NotifyActionType, java.rmi.MarshalledObject, com.j_spaces.core.client.INotifyDelegatorFilter)instead.addListener(Object template, RemoteEventListener listener, NotifyActionType actionTypes) Registers a listener with a space using a POJO templateaddListener(Object template, RemoteEventListener listener, NotifyActionType notifyType, MarshalledObject handback, INotifyDelegatorFilter filter) Registers a listener with a space using a POJO templateprotected abstract EventRegistrationaddListenerInternal(Object template, long lease, NotifyInfo notifyInfo) voidclose()closes the session and deregister all listeners.createNotifyInfo(RemoteEventListener listener, NotifyActionType notifyType) protected IDirectSpaceProxyRetrieves the bounded configuration object.getSpace()voidremoveListener(EventRegistration registration) Unregisters the listener from the space.
-
Constructor Details
-
AbstractDataEventSession
-
-
Method Details
-
getSpace
- Specified by:
getSpacein interfaceEventSession- Returns:
- the space that the session is attached to.
-
getNotificationsSpace
-
getSessionConfig
Description copied from interface:EventSessionRetrieves the bounded configuration object.- Specified by:
getSessionConfigin interfaceEventSession- Returns:
- the EventSessionConfig object.
-
close
Description copied from interface:EventSessioncloses the session and deregister all listeners.- Specified by:
closein interfaceEventSession- Throws:
RemoteException- if the remove space failed to remove the notification registration.
-
addListener
public EventRegistration addListener(Object template, RemoteEventListener listener) throws RemoteException Description copied from interface:DataEventSessionRegisters a listener with a space using a POJO template. Equals to addListener( template, listener, Lease.FOREVER, NotifyActionType.NOTIFY_ALL)- Specified by:
addListenerin interfaceDataEventSession- 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
public EventRegistration addListener(Object template, RemoteEventListener listener, NotifyActionType actionTypes) throws RemoteException Description copied from interface:DataEventSessionRegisters a listener with a space using a POJO template- Specified by:
addListenerin interfaceDataEventSession- 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
public EventRegistration addListener(Object template, RemoteEventListener listener, long lease, NotifyActionType actionTypes) throws RemoteException Description copied from interface:DataEventSessionData event registration with custom lease is deprecated - useDataEventSession.addListener(Object, net.jini.core.event.RemoteEventListener, NotifyActionType)instead.- Specified by:
addListenerin interfaceDataEventSession- Throws:
RemoteException
-
addListener
public EventRegistration addListener(Object template, RemoteEventListener listener, NotifyActionType notifyType, MarshalledObject handback, INotifyDelegatorFilter filter) throws RemoteException Description copied from interface:DataEventSessionRegisters a listener with a space using a POJO template- Specified by:
addListenerin interfaceDataEventSession- Parameters:
template- the template to be match with.listener- the listenernotifyType- 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
public EventRegistration addListener(Object template, RemoteEventListener listener, long lease, MarshalledObject handback, INotifyDelegatorFilter filter, NotifyActionType notifyType) throws RemoteException Description copied from interface:DataEventSessionData event registration with custom lease is deprecated - useDataEventSession.addListener(Object, net.jini.core.event.RemoteEventListener, NotifyActionType, java.rmi.MarshalledObject, com.j_spaces.core.client.INotifyDelegatorFilter)instead.- Specified by:
addListenerin interfaceDataEventSession- Throws:
RemoteException
-
addListener
public EventRegistration addListener(Object template, long lease, NotifyInfo notifyInfo) throws RemoteException - Throws:
RemoteException
-
addListenerInternal
protected abstract EventRegistration addListenerInternal(Object template, long lease, NotifyInfo notifyInfo) throws RemoteException - Throws:
RemoteException
-
createNotifyInfo
-
removeListener
Description copied from interface:DataEventSessionUnregisters the listener from the space.- Specified by:
removeListenerin interfaceDataEventSession- 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.
-