|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object rice.p2p.scribe.ScribeImpl dermi.core.pastry.DermiKernel
public class DermiKernel
This class implements the kernel of Dermi based on Scribe. It extends the Scribe event service to provide all the features and services
Nested Class Summary |
---|
Nested classes/interfaces inherited from class rice.p2p.scribe.ScribeImpl |
---|
rice.p2p.scribe.ScribeImpl.TopicManager |
Field Summary |
---|
Fields inherited from class rice.p2p.scribe.ScribeImpl |
---|
endpoint, handle, MAINTENANCE_INTERVAL, MESSAGE_TIMEOUT, policy, topics |
Constructor Summary | |
---|---|
DermiKernel(java.lang.String instance,
DermiConnection conn)
The kernel constructor |
Method Summary | |
---|---|
void |
addInterceptor(DermiApplicationListener client,
Topic topic,
java.lang.String intId)
Method for adding an interceptor object to an object group |
void |
anycast(Topic topic,
DermiContent cnt)
|
void |
continueInterception(java.util.Hashtable evt,
java.util.ArrayList interceptors)
Method invoked by interceptor skeletons to resume the interception process |
void |
deliver(rice.p2p.commonapi.Id id,
rice.p2p.commonapi.Message message)
This method is called on the application at the destination node for the given id. |
boolean |
forward(rice.p2p.commonapi.RouteMessage message)
The Common API forward method has been changed to first pass the RouteMessage to Dermi's notification parser, so as to be able to route new messages with content changes (useful in manycalls) |
PriorityList |
getComponentHops(java.lang.String componentId)
|
rice.p2p.commonapi.NodeHandle |
getLocalNodeHandle()
Returns the local node handle |
java.util.Collection |
getReplicaSet(Id id,
int maxRank)
Returns a set of suitable replica nodes for such Id |
void |
publish(Topic topic,
DermiContent cnt)
|
void |
publishDirect(Topic topic,
DermiContent content)
Publishes a direct message to the topic. |
void |
removeInterceptor(rice.p2p.scribe.Topic topic,
java.lang.String intId)
Method for removing an interceptor from an object group |
void |
subscribe(Topic topic,
Client client)
|
void |
unsubscribe(Topic topic,
Client client)
Unsubscribes the given client from the provided topic. |
void |
update(NodeHandle handle,
boolean joined)
This method is invoked to inform the application that the given node has either joined or left the neighbor set of the local node, as the set would be returned by the neighborSet call. |
Methods inherited from class rice.p2p.scribe.ScribeImpl |
---|
addChild, addChild, anycast, getChildren, getClients, getEnvironment, getId, getParent, getPolicy, getTopics, isRoot, publish, removeChild, removeChild, setPolicy, subscribe, subscribe, unsubscribe, update |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DermiKernel(java.lang.String instance, DermiConnection conn)
instance
- String Instance nameconn
- DermiConnection The connection nodeMethod Detail |
---|
public void addInterceptor(DermiApplicationListener client, Topic topic, java.lang.String intId)
client
- ScribeClient Interceptor applicationtopic
- Topic Group's identifierintId
- String Interceptor idpublic void removeInterceptor(rice.p2p.scribe.Topic topic, java.lang.String intId)
topic
- Topic Group's identifierintId
- String Interceptor idpublic rice.p2p.commonapi.NodeHandle getLocalNodeHandle()
public void publish(Topic topic, DermiContent cnt)
public void anycast(Topic topic, DermiContent cnt)
public java.util.Collection getReplicaSet(Id id, int maxRank)
id
- Id Which id to replicatemaxRank
- int Maximum number of replicas
public void publishDirect(Topic topic, DermiContent content)
topic
- The topic to publish tocontent
- The content to publishpublic void update(NodeHandle handle, boolean joined)
handle
- The handle that has joined/leftjoined
- Whether the node has joined or leftpublic PriorityList getComponentHops(java.lang.String componentId)
public boolean forward(rice.p2p.commonapi.RouteMessage message)
forward
in interface rice.p2p.commonapi.Application
forward
in class rice.p2p.scribe.ScribeImpl
message
- RouteMessage Received message
public void deliver(rice.p2p.commonapi.Id id, rice.p2p.commonapi.Message message)
deliver
in interface rice.p2p.commonapi.Application
deliver
in class rice.p2p.scribe.ScribeImpl
id
- The destination id of the messagemessage
- The message being sentpublic void continueInterception(java.util.Hashtable evt, java.util.ArrayList interceptors)
evt
- Hashtable Event datainterceptors
- ArrayList Remaining interceptors to be traversedpublic void unsubscribe(Topic topic, Client client)
topic
- The topic to unsubscribe fromclient
- The client to unsubscribepublic void subscribe(Topic topic, Client client)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |