|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectdermi.session.pastry.Session
public class 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
| Field Summary | |
|---|---|
DermiConnection |
conn
|
| Constructor Summary | |
|---|---|
Session()
|
|
| Method Summary | |
|---|---|
void |
addActiveObject(java.lang.String uid,
ERemote ref)
|
void |
addInterceptor(RemoteInterceptorListener sel,
java.util.Hashtable evt)
Add interceptor application to specified multicast group. |
void |
addRemoteAnycallEventListener(RemoteEventListener sel,
java.util.Hashtable event)
Add remote anycast event listener to specified multicast group. |
void |
anycall(java.util.Hashtable evt)
Make a method call to any of the group members. |
void |
close()
Closes the current session. |
boolean |
containsActiveObject(java.lang.String uid)
|
void |
continueInterception(java.util.Hashtable evt,
java.util.ArrayList interceptors)
Invoked by interceptor skeleton to force the resuming of the interception process |
ActivatorClient |
getActivator()
|
PriorityList |
getComponentHops(java.lang.String uid)
|
Node |
getLocalNode()
Gets an instance to the current local node |
NodeHandle |
getLocalNodeHandle()
Gets an instance to the current local node handle |
Id |
getLocalNodeId()
Gets an instance to the current 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 env)
Opens a new session. |
void |
publish(java.util.Hashtable evt)
Send event to multicast group. |
void |
publish(java.util.Hashtable event,
java.io.Serializable obj)
Send object event to multicast group. |
void |
publishDirect(java.util.Hashtable evt)
Send event directly. |
void |
publishDirect(java.util.Hashtable event,
java.io.Serializable obj)
Send object directly. |
void |
removeActiveObject(java.lang.String uid)
|
void |
removeInterceptor(java.util.Hashtable evt)
Remove interceptor application from specified multicast group. |
void |
removeRemoteAnycallEventListener(RemoteEventListener sel,
java.util.Hashtable event)
Removes an anycall event listener |
void |
subscribe(RemoteEventListener sel,
java.util.Hashtable event)
Add remote event listener to specified multicast group. |
void |
subscribe(RemoteEventListener listener,
java.lang.String subs)
Add remote event listener to specified multicast group. |
void |
unsubscribe(RemoteEventListener sel,
java.util.Hashtable event)
Remove remote event listener from the specified multicast group. |
void |
unsubscribe(RemoteEventListener listener,
java.lang.String subs)
Remove remote event listener from the specified multicast group. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public DermiConnection conn
| Constructor Detail |
|---|
public Session()
| Method Detail |
|---|
public void open(java.util.Hashtable env)
throws SessionException
open in interface Sessionenv - environment connection properties
SessionException - if any exception occurs
public void close()
throws SessionException
close in interface SessionSessionException
public void publish(java.util.Hashtable evt)
throws SessionException
publish in interface Sessionevt - group subscription
SessionException
public void publish(java.util.Hashtable event,
java.io.Serializable obj)
throws SessionException
publish in interface Sessionevent - group subscriptionobj - object to be sent
SessionException
public void publishDirect(java.util.Hashtable evt)
throws SessionException
publishDirect in interface Sessionevt - group subscription
SessionException
public void publishDirect(java.util.Hashtable event,
java.io.Serializable obj)
throws SessionException
publishDirect in interface Sessionevent - group subscriptionobj - object to be sent
SessionException
public void addInterceptor(RemoteInterceptorListener sel,
java.util.Hashtable evt)
throws SessionException
addInterceptor in interface Sessionsel - the filter application to be calledevt - group subscription
SessionException
public void removeInterceptor(java.util.Hashtable evt)
throws SessionException
removeInterceptor in interface Sessionevt - group subscription
SessionException
public void anycall(java.util.Hashtable evt)
throws SessionException
anycall in interface Sessionevt - hashtable containing group id, method to be invoked, params, ...
SessionException - If something goes wrong ;-)
public void addRemoteAnycallEventListener(RemoteEventListener sel,
java.util.Hashtable event)
throws SessionException
addRemoteAnycallEventListener in interface Sessionsel - the remote anycast event listener application to be calledevent - group subscription
SessionException
public void subscribe(RemoteEventListener sel,
java.util.Hashtable event)
throws SessionException
subscribe in interface Sessionsel - the remote event listener application to be calledevent - group subscription
SessionExceptionRemoteEventListener
public void subscribe(RemoteEventListener listener,
java.lang.String subs)
throws SessionException
subscribe in interface Sessionlistener - the remote event listener application to be calledsubs - group subscription
SessionExceptionRemoteEventListener
public java.util.Collection getReplicaSet(Id id,
int maxRank)
getReplicaSet in interface Sessionid - Id Which id to replicatemaxRank - int Maximum number of replicas
public void unsubscribe(RemoteEventListener sel,
java.util.Hashtable event)
throws SessionException
unsubscribe in interface Sessionevent - group subscriptionsel - RemoteEventListener The listener of remote events
SessionException
public void unsubscribe(RemoteEventListener listener,
java.lang.String subs)
throws SessionException
unsubscribe in interface Sessionlistener - listener to unsubscribesubs - group subscription
SessionException
public void removeRemoteAnycallEventListener(RemoteEventListener sel,
java.util.Hashtable event)
throws SessionException
removeRemoteAnycallEventListener in interface Sessionsel - RemoteAnycallEventListener The listenerevent - Hashtable Event subscription data
SessionException - If something goes wrong ;-)public NodeHandle getLocalNodeHandle()
getLocalNodeHandle in interface Sessionpublic Node getLocalNode()
getLocalNode in interface Sessionpublic Id getLocalNodeId()
getLocalNodeId in interface Session
public void continueInterception(java.util.Hashtable evt,
java.util.ArrayList interceptors)
continueInterception in interface Sessionevt - Hashtable Event datainterceptors - ArrayList Remaining interceptorspublic ActivatorClient getActivator()
getActivator in interface Session
public void addActiveObject(java.lang.String uid,
ERemote ref)
addActiveObject in interface Sessionpublic void removeActiveObject(java.lang.String uid)
removeActiveObject in interface Sessionpublic java.util.Collection listActiveObjects()
listActiveObjects in interface Sessionpublic boolean containsActiveObject(java.lang.String uid)
containsActiveObject in interface Sessionpublic PriorityList getComponentHops(java.lang.String uid)
getComponentHops in interface Session
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||