|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdermi.core.DermiConnection
This class wraps a connection to Pastry and is used by Dermi as its main routing substrate.
Field Summary | |
---|---|
static java.lang.String |
BOOTSTRAP_HOST
|
static int |
BOOTSTRAP_PORT
|
protected rice.pastry.PastryNodeFactory |
factory
|
static rice.p2p.commonapi.IdFactory |
FACTORY
|
static java.lang.String |
INSTANCE_NAME
|
protected rice.p2p.commonapi.Node[] |
nodes
|
static int |
NUM_NODES
|
static int |
PORT
|
static int |
PROTOCOL
|
static int |
PROTOCOL_DIRECT
|
protected rice.pastry.direct.NetworkSimulator |
simulator
|
static int |
SIMULATOR
|
static int |
SIMULATOR_EUCLIDEAN
|
static int |
SIMULATOR_SPHERE
|
Constructor Summary | |
---|---|
DermiConnection(java.lang.String bootHost,
int bootPort,
rice.pastry.PastryNodeFactory fac,
int protocol)
This method creates a new node which will serve as the underlying p2p layer for Dermi |
Method Summary | |
---|---|
void |
addInterceptor(NotificationParser npar,
rice.p2p.commonapi.Id subsKey,
java.lang.String interceptorId)
Method for adding an interceptor to an object group |
void |
anycall(rice.p2p.scribe.Topic topic,
java.io.Serializable data)
Method for anycalling to a group of objects |
void |
close()
Method for closing a connection, thus killing the node |
void |
continueInterception(java.util.Hashtable evt,
java.util.ArrayList interceptors)
Method for resume the interception process. |
protected rice.pastry.NodeHandle |
getBootstrap()
Gets a handle to a bootstrap node. |
rice.p2p.commonapi.Node |
getLocalNode()
Utility method for obtaining the local node |
rice.p2p.commonapi.NodeHandle |
getLocalNodeHandle()
Utility method for obtaining the local node handle |
void |
publish(rice.p2p.scribe.Topic topic,
java.io.Serializable data)
Method for publishing data |
void |
publishDirect(rice.p2p.scribe.Topic topic,
java.io.Serializable data)
Method for publishing data directly to a node |
void |
removeInterceptor(rice.p2p.commonapi.Id subsKey,
java.lang.String interceptorId)
Method for removing an interceptor from an object group |
void |
subscribe(rice.p2p.scribe.Topic topic,
rice.p2p.scribe.ScribeClient subscriber)
Method for subscribing an application to a multicast group |
void |
unsubscribe(rice.p2p.scribe.Topic topic,
rice.p2p.scribe.ScribeClient subscriber)
Method for unsubscribing an application from a multicast group |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected rice.p2p.commonapi.Node[] nodes
public static int NUM_NODES
protected rice.pastry.PastryNodeFactory factory
protected rice.pastry.direct.NetworkSimulator simulator
public static final int PROTOCOL_DIRECT
public static final int SIMULATOR_SPHERE
public static final int SIMULATOR_EUCLIDEAN
public static rice.p2p.commonapi.IdFactory FACTORY
public static int PORT
public static java.lang.String BOOTSTRAP_HOST
public static int BOOTSTRAP_PORT
public static int PROTOCOL
public static int SIMULATOR
public static java.lang.String INSTANCE_NAME
Constructor Detail |
---|
public DermiConnection(java.lang.String bootHost, int bootPort, rice.pastry.PastryNodeFactory fac, int protocol) throws ConnectionException
bootHost
- String Bootstrap hostbootPort
- int Bootstrap portfac
- PastryNodeFactory The node factory to useprotocol
- int The protocol to be used
ConnectionException
- If connection cannot be established against the bootstrapMethod Detail |
---|
protected rice.pastry.NodeHandle getBootstrap()
public void subscribe(rice.p2p.scribe.Topic topic, rice.p2p.scribe.ScribeClient subscriber)
topic
- Topic The group's identifiersubscriber
- ScribeClient The application to subscribepublic void unsubscribe(rice.p2p.scribe.Topic topic, rice.p2p.scribe.ScribeClient subscriber)
topic
- Topic The group's identifiersubscriber
- ScribeClient The application to unsubscribepublic void publish(rice.p2p.scribe.Topic topic, java.io.Serializable data)
topic
- Topic The group's identifierdata
- Serializable Data to publishpublic void publishDirect(rice.p2p.scribe.Topic topic, java.io.Serializable data)
topic
- Topic The group's identifierdata
- Serializable Data to publishpublic void anycall(rice.p2p.scribe.Topic topic, java.io.Serializable data)
topic
- Topic The group's identifierdata
- Serializable Data to publishpublic rice.p2p.commonapi.NodeHandle getLocalNodeHandle()
public rice.p2p.commonapi.Node getLocalNode()
public void addInterceptor(NotificationParser npar, rice.p2p.commonapi.Id subsKey, java.lang.String interceptorId)
npar
- NotificationParser Interceptor applicationsubsKey
- Id Subscription keyinterceptorId
- String Interceptor idpublic void removeInterceptor(rice.p2p.commonapi.Id subsKey, java.lang.String interceptorId)
subsKey
- Id Subscription keyinterceptorId
- String Interceptor idpublic void continueInterception(java.util.Hashtable evt, java.util.ArrayList interceptors)
evt
- Hashtableinterceptors
- ArrayListpublic void close()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |