GigaSpaces XAP 7.0 API

com.gigaspaces.events
Interface DataEventSession

All Superinterfaces:
EventSession

public interface DataEventSession
extends EventSession

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().

Since:
6.0
Version:
1.0
Author:
asy ronen
See Also:
EventSession

Method Summary
 net.jini.core.event.EventRegistration addListener(Object template, net.jini.core.event.RemoteEventListener listener)
          Registers a listener with a space using a POJO template.
 net.jini.core.event.EventRegistration addListener(Object template, net.jini.core.event.RemoteEventListener listener, long lease, MarshalledObject handback, INotifyDelegatorFilter filter, NotifyActionType actionTypes)
          Registers a listener with a space using a POJO template
 net.jini.core.event.EventRegistration addListener(Object template, net.jini.core.event.RemoteEventListener listener, long lease, NotifyActionType actionTypes)
          Registers a listener with a space using a POJO template
 void removeListener(net.jini.core.event.EventRegistration registration)
          Unregisters the listener from the space.
 
Methods inherited from interface com.gigaspaces.events.EventSession
close, getSessionConfig, getSpace, getTransaction
 

Method Detail

addListener

net.jini.core.event.EventRegistration addListener(Object template,
                                                  net.jini.core.event.RemoteEventListener listener)
                                                  throws RemoteException,
                                                         net.jini.core.transaction.TransactionException
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
net.jini.core.transaction.TransactionException - if the transaction associated with this session has expired.

addListener

net.jini.core.event.EventRegistration addListener(Object template,
                                                  net.jini.core.event.RemoteEventListener listener,
                                                  long lease,
                                                  NotifyActionType actionTypes)
                                                  throws RemoteException,
                                                         net.jini.core.transaction.TransactionException
Registers a listener with a space using a POJO template

Parameters:
template - the template to be match with.
listener - the listener
lease - the time duration in which the listener will be receiving calls.
actionTypes - 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
net.jini.core.transaction.TransactionException - if the transaction associated with this session has expired.

addListener

net.jini.core.event.EventRegistration addListener(Object template,
                                                  net.jini.core.event.RemoteEventListener listener,
                                                  long lease,
                                                  MarshalledObject handback,
                                                  INotifyDelegatorFilter filter,
                                                  NotifyActionType actionTypes)
                                                  throws RemoteException,
                                                         net.jini.core.transaction.TransactionException
Registers a listener with a space using a POJO template

Parameters:
template - the template to be match with.
listener - the listener
lease - the time duration in which the listener will be receiving calls.
handback - an object that will be passed back to the listener when notified.
filter - a server-side filter to filter out notifications.
actionTypes - 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
net.jini.core.transaction.TransactionException - if the transaction associated with this session has expired.

removeListener

void removeListener(net.jini.core.event.EventRegistration registration)
                    throws RemoteException,
                           net.jini.core.lease.UnknownLeaseException
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.
net.jini.core.lease.UnknownLeaseException - if the lease of the registration is invalid.
See Also:
addListener(Object, net.jini.core.event.RemoteEventListener, long, java.rmi.MarshalledObject, com.j_spaces.core.client.INotifyDelegatorFilter, NotifyActionType)

GigaSpaces XAP 7.0 API

Copyright © GigaSpaces.