|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdermi.session.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 |
addInterceptor(RemoteInterceptorListener sel,
java.util.Hashtable evt)
Add interceptor application to specified multicast group. |
void |
addRemoteAnycallEventListener(RemoteAnycallEventListener 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. |
void |
continueInterception(java.util.Hashtable evt,
java.util.ArrayList interceptors)
Invoked by interceptor skeleton to force the resuming of the interception process |
rice.p2p.commonapi.Node |
getLocalNode()
Gets an instance to the current local node |
rice.p2p.commonapi.NodeHandle |
getLocalNodeHandle()
Gets an instance to the current local node handle |
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 |
removeInterceptor(java.util.Hashtable evt)
Remove interceptor application from specified multicast group. |
void |
removeRemoteAnycallEventListener(RemoteAnycallEventListener 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(RemoteAnycallEventListener 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 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(RemoteAnycallEventListener 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 rice.p2p.commonapi.NodeHandle getLocalNodeHandle()
getLocalNodeHandle
in interface Session
public rice.p2p.commonapi.Node getLocalNode()
getLocalNode
in interface Session
public void continueInterception(java.util.Hashtable evt, java.util.ArrayList interceptors)
continueInterception
in interface Session
evt
- Hashtable Event datainterceptors
- ArrayList Remaining interceptors
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |