|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Session
The Session class establishes a simple contract to access publish/subscribe middleware. It mimics the delegation event model to smooth the transition from local to remote events for Java programmers
Method Summary | |
---|---|
void |
addActiveObject(java.lang.String uid,
ERemote ref)
|
void |
addInterceptor(RemoteInterceptorListener listener,
java.util.Hashtable evt)
Adds an interceptor to the specified multicast group |
void |
addRemoteAnycallEventListener(RemoteEventListener sel,
java.util.Hashtable subscription)
Adds an anycall listener |
void |
anycall(java.util.Hashtable evt)
Makes an anycall |
void |
close()
The close method safely frees resources and closes the connection. |
boolean |
containsActiveObject(java.lang.String uid)
|
void |
continueInterception(java.util.Hashtable evt,
java.util.ArrayList interceptors)
Continues distributed interception process |
ActivatorClient |
getActivator()
|
PriorityList |
getComponentHops(java.lang.String uid)
|
Node |
getLocalNode()
Method used to obtain the local node instance |
NodeHandle |
getLocalNodeHandle()
Method used to obtain the local node handle for this node |
Id |
getLocalNodeId()
Method used to obtain the local node id |
java.util.Collection |
getReplicaSet(Id id,
int maxRank)
Returns a set of suitable replica nodes for such Id |
java.util.Collection |
listActiveObjects()
|
void |
open(java.util.Hashtable evt)
The open method is mainly used by the facility class SessionFactory, so normally should not be used by programmers. |
void |
publish(java.util.Hashtable event)
The publish method produces notifications in a simple and straightforward style. |
void |
publish(java.util.Hashtable event,
java.io.Serializable obj)
Publisher method that accepts a Serializable object as a parameter. |
void |
publishDirect(java.util.Hashtable event)
Publishes an event directly to a peer (without routing it through the rendezvous point) |
void |
publishDirect(java.util.Hashtable event,
java.io.Serializable obj)
Publishes an event directly to a peer (without routing it through the rendezvous point) |
void |
removeActiveObject(java.lang.String uid)
|
void |
removeInterceptor(java.util.Hashtable evt)
Removes an interceptor from the specified multicast group |
void |
removeRemoteAnycallEventListener(RemoteEventListener sel,
java.util.Hashtable subscription)
Removes an anycall listener |
void |
subscribe(RemoteEventListener listener,
java.util.Hashtable subs)
This method creates a listener of remote events that matches the subscription specified in the subscription parameter. |
void |
subscribe(RemoteEventListener listener,
java.lang.String subs)
This method creates a listener of remote events that matches the subscription specified in the subscription parameter. |
void |
unsubscribe(RemoteEventListener listener,
java.util.Hashtable subs)
This method removes the subscription specified in subscription parameters. |
void |
unsubscribe(RemoteEventListener listener,
java.lang.String subs)
This method removes the subscription specified in subscription parameters. |
Method Detail |
---|
void open(java.util.Hashtable evt) throws SessionException
evt
- Hashtable key/value pairs representing connection parameters
SessionException
- It throws the wrapper SessionException encapsulating all possible problems in the connection phase.void close() throws SessionException
SessionException
- It throws the wrapper SessionException encapsulating all possible problems in the connection phase.void subscribe(RemoteEventListener listener, java.lang.String subs) throws SessionException
listener
- RemoteEventListener The listener of remote events. It will handle incoming events matching the subscription.subs
- String The subscription is represented using a String in the specified constraint filter language of the used notification service.
SessionException
- It throws the wrapper SessionException encapsulating all possible problems in the connection phase.RemoteEventListener
void subscribe(RemoteEventListener listener, java.util.Hashtable subs) throws SessionException
listener
- RemoteEventListener The listener of remote events. It will handle incoming events matching the subscription.subs
- Hashtable The subscription is represented using a Hashtable.
SessionException
- It throws the wrapper SessionException encapsulating all possible problems in the connection phase.RemoteEventListener
void unsubscribe(RemoteEventListener listener, java.lang.String subs) throws SessionException
listener
- RemoteEventListener The listener of remote eventssubs
- String The subscription to be removed (using specific constraint filter language)
SessionException
- It throws the wrapper SessionException encapsulating all possible problems in the connection phase.void unsubscribe(RemoteEventListener listener, java.util.Hashtable subs) throws SessionException
listener
- RemoteEventListener The listener of remote eventssubs
- Hashtable The subscription to be removed
SessionException
- It throws the wrapper SessionException encapsulating all possible problems in the connection phase.void publish(java.util.Hashtable event) throws SessionException
event
- Hashtable The well-known java.util.Hashtable class is used for creating key/value pair notifications
SessionException
- It throws the wrapper SessionException encapsulating all possible problems in the connection phase.void publish(java.util.Hashtable event, java.io.Serializable obj) throws SessionException
event
- Hashtable The well-known java.util.Hashtable class is used for creating key/value pair notificationsobj
- Serializable Java serializable object
SessionException
- It throws the wrapper SessionException encapsulating all possible problems in the connection phase.void publishDirect(java.util.Hashtable event) throws SessionException
event
- Hashtable Event data
SessionException
- If something goes wrong ;-)void publishDirect(java.util.Hashtable event, java.io.Serializable obj) throws SessionException
event
- Hashtable Event dataobj
- Serializable Object to publish
SessionException
- If something goes wrong ;-)void addInterceptor(RemoteInterceptorListener listener, java.util.Hashtable evt) throws SessionException
listener
- RemoteInterceptorListener The interceptor to addevt
- Hashtable Subscription data
SessionException
- If something goes wrong ;-)void removeInterceptor(java.util.Hashtable evt) throws SessionException
evt
- Hashtable Subscription data
SessionException
- If something goes wrong ;-)void continueInterception(java.util.Hashtable evt, java.util.ArrayList interceptors)
evt
- Hashtable Event datainterceptors
- ArrayList List of remaining interceptorsvoid addRemoteAnycallEventListener(RemoteEventListener sel, java.util.Hashtable subscription) throws SessionException
sel
- RemoteAnycallEventListener The listenersubscription
- Hashtable Subscription data
SessionException
- If something goes wrong ;-)void removeRemoteAnycallEventListener(RemoteEventListener sel, java.util.Hashtable subscription) throws SessionException
sel
- RemoteAnycallEventListener The listenersubscription
- Hashtable Subscription data
SessionException
- If something goes wrong ;-)void anycall(java.util.Hashtable evt) throws SessionException
evt
- Hashtable Subscription data
SessionException
- If something goes wrong ;-)java.util.Collection getReplicaSet(Id id, int maxRank)
id
- Id Which id to replicatemaxRank
- int Maximum number of replicas
NodeHandle getLocalNodeHandle()
Node getLocalNode()
Id getLocalNodeId()
ActivatorClient getActivator()
void addActiveObject(java.lang.String uid, ERemote ref)
void removeActiveObject(java.lang.String uid)
boolean containsActiveObject(java.lang.String uid)
java.util.Collection listActiveObjects()
PriorityList getComponentHops(java.lang.String uid)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |