|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object dermi.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 Session
env
- environment connection properties
SessionException
- if any exception occurspublic void close() throws SessionException
close
in interface Session
SessionException
public void publish(java.util.Hashtable evt) throws SessionException
publish
in interface Session
evt
- group subscription
SessionException
public void publish(java.util.Hashtable event, java.io.Serializable obj) throws SessionException
publish
in interface Session
event
- group subscriptionobj
- object to be sent
SessionException
public void publishDirect(java.util.Hashtable evt) throws SessionException
publishDirect
in interface Session
evt
- group subscription
SessionException
public void publishDirect(java.util.Hashtable event, java.io.Serializable obj) throws SessionException
publishDirect
in interface Session
event
- group subscriptionobj
- object to be sent
SessionException
public void addInterceptor(RemoteInterceptorListener sel, java.util.Hashtable evt) throws SessionException
addInterceptor
in interface Session
sel
- the filter application to be calledevt
- group subscription
SessionException
public void removeInterceptor(java.util.Hashtable evt) throws SessionException
removeInterceptor
in interface Session
evt
- group subscription
SessionException
public void anycall(java.util.Hashtable evt) throws SessionException
anycall
in interface Session
evt
- 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 Session
sel
- 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 Session
sel
- the remote event listener application to be calledevent
- group subscription
SessionException
RemoteEventListener
public void subscribe(RemoteEventListener listener, java.lang.String subs) throws SessionException
subscribe
in interface Session
listener
- the remote event listener application to be calledsubs
- group subscription
SessionException
RemoteEventListener
public java.util.Collection getReplicaSet(Id id, int maxRank)
getReplicaSet
in interface Session
id
- Id Which id to replicatemaxRank
- int Maximum number of replicas
public void unsubscribe(RemoteEventListener sel, java.util.Hashtable event) throws SessionException
unsubscribe
in interface Session
event
- group subscriptionsel
- RemoteEventListener The listener of remote events
SessionException
public void unsubscribe(RemoteEventListener listener, java.lang.String subs) throws SessionException
unsubscribe
in interface Session
listener
- listener to unsubscribesubs
- group subscription
SessionException
public void removeRemoteAnycallEventListener(RemoteEventListener sel, java.util.Hashtable event) throws SessionException
removeRemoteAnycallEventListener
in interface Session
sel
- RemoteAnycallEventListener The listenerevent
- Hashtable Event subscription data
SessionException
- If something goes wrong ;-)public NodeHandle getLocalNodeHandle()
getLocalNodeHandle
in interface Session
public Node getLocalNode()
getLocalNode
in interface Session
public Id getLocalNodeId()
getLocalNodeId
in interface Session
public void continueInterception(java.util.Hashtable evt, java.util.ArrayList interceptors)
continueInterception
in interface Session
evt
- Hashtable Event datainterceptors
- ArrayList Remaining interceptorspublic ActivatorClient getActivator()
getActivator
in interface Session
public void addActiveObject(java.lang.String uid, ERemote ref)
addActiveObject
in interface Session
public void removeActiveObject(java.lang.String uid)
removeActiveObject
in interface Session
public java.util.Collection listActiveObjects()
listActiveObjects
in interface Session
public boolean containsActiveObject(java.lang.String uid)
containsActiveObject
in interface Session
public 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 |