|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object easypastry.cast.CastHandler
public class CastHandler
Field Summary | |
---|---|
protected rice.p2p.commonapi.Endpoint |
endpoint
|
Constructor Summary | |
---|---|
CastHandler(rice.p2p.commonapi.Node node)
The constructor for this scribe client. |
Method Summary | |
---|---|
void |
addDeliverListener(java.lang.String id,
CastListener dsl)
Listeners & Filters |
void |
addForwardFilter(java.lang.String id,
java.lang.String name,
CastFilter dsf)
|
boolean |
anycast(rice.p2p.scribe.Topic topic,
rice.p2p.scribe.ScribeContent content)
Called when we receive an anycast. |
void |
childAdded(rice.p2p.scribe.Topic topic,
rice.p2p.commonapi.NodeHandle child)
More Scribe Methods |
void |
childRemoved(rice.p2p.scribe.Topic topic,
rice.p2p.commonapi.NodeHandle child)
|
void |
close()
|
void |
deliver(rice.p2p.commonapi.Id id,
rice.p2p.commonapi.Message message)
|
void |
deliver(rice.p2p.scribe.Topic topic,
rice.p2p.scribe.ScribeContent content)
Called whenever we receive a published message. |
boolean |
forward(rice.p2p.commonapi.RouteMessage message)
Application |
java.util.Collection<rice.p2p.commonapi.NodeHandle> |
getChildren(java.lang.String subject)
|
java.util.Collection<CastFilter> |
getForwardFilters(java.lang.String id)
|
rice.p2p.commonapi.NodeHandle |
getLocalNodeHandle()
|
java.util.Collection<rice.p2p.commonapi.NodeHandle> |
getNeighbours(int num,
boolean ordered)
|
rice.p2p.commonapi.NodeHandle |
getParent(java.lang.String subject)
|
rice.p2p.commonapi.IdRange |
getRange(rice.p2p.commonapi.NodeHandle handle,
int rank,
rice.p2p.commonapi.Id lkey)
|
java.util.Collection<rice.p2p.commonapi.NodeHandle> |
getReplicaSet(rice.p2p.commonapi.Id id,
int num)
|
boolean |
isRoot(java.lang.String subject)
Some passthrough accessors |
void |
removeDeliverListener(java.lang.String id)
|
void |
removeForwardFiter(java.lang.String id,
java.lang.String name)
|
void |
sendAnycast(java.lang.String subject,
CastContent content)
Sends an anycast message. |
void |
sendDirect(rice.p2p.commonapi.NodeHandle destNH,
CastContent content)
Sends a direct message. |
void |
sendHopped(rice.p2p.commonapi.Id id,
CastContent content)
Sends a hopped message. |
void |
sendManycast(java.lang.String subject,
CastContent content,
int num)
Sends a manycast message. |
void |
sendMulticast(java.lang.String subject,
CastContent content)
Sends a multicast message. |
void |
subscribe(java.lang.String subject)
Subscribes to id. |
void |
subscribeFailed(java.util.Collection<rice.p2p.scribe.Topic> topics)
|
void |
subscribeFailed(rice.p2p.scribe.Topic topic)
|
void |
subscribeSuccess(java.util.Collection<rice.p2p.scribe.Topic> topics)
|
void |
unsubscribe(java.lang.String subject)
Unsubscribes to id. |
void |
update(rice.p2p.commonapi.NodeHandle handle,
boolean joined)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected rice.p2p.commonapi.Endpoint endpoint
Constructor Detail |
---|
public CastHandler(rice.p2p.commonapi.Node node)
node
- the PastryNodeMethod Detail |
---|
public void subscribe(java.lang.String subject)
CastService
subscribe
in interface CastService
public void unsubscribe(java.lang.String subject)
CastService
unsubscribe
in interface CastService
public void sendDirect(rice.p2p.commonapi.NodeHandle destNH, CastContent content)
CastService
sendDirect
in interface CastService
public void sendHopped(rice.p2p.commonapi.Id id, CastContent content)
CastService
sendHopped
in interface CastService
public void sendAnycast(java.lang.String subject, CastContent content)
CastService
sendAnycast
in interface CastService
public void sendManycast(java.lang.String subject, CastContent content, int num)
CastService
sendManycast
in interface CastService
public void sendMulticast(java.lang.String subject, CastContent content)
CastService
sendMulticast
in interface CastService
public boolean anycast(rice.p2p.scribe.Topic topic, rice.p2p.scribe.ScribeContent content)
anycast
in interface rice.p2p.scribe.ScribeClient
anycast
in interface rice.p2p.scribe.ScribeMultiClient
public void deliver(rice.p2p.scribe.Topic topic, rice.p2p.scribe.ScribeContent content)
deliver
in interface rice.p2p.scribe.ScribeClient
deliver
in interface rice.p2p.scribe.ScribeMultiClient
public boolean forward(rice.p2p.commonapi.RouteMessage message)
forward
in interface rice.p2p.commonapi.Application
public void deliver(rice.p2p.commonapi.Id id, rice.p2p.commonapi.Message message)
deliver
in interface rice.p2p.commonapi.Application
public void update(rice.p2p.commonapi.NodeHandle handle, boolean joined)
update
in interface rice.p2p.commonapi.Application
public void addDeliverListener(java.lang.String id, CastListener dsl)
CastService
addDeliverListener
in interface CastService
public void removeDeliverListener(java.lang.String id)
removeDeliverListener
in interface CastService
public void addForwardFilter(java.lang.String id, java.lang.String name, CastFilter dsf)
addForwardFilter
in interface CastService
public void removeForwardFiter(java.lang.String id, java.lang.String name)
removeForwardFiter
in interface CastService
public java.util.Collection<CastFilter> getForwardFilters(java.lang.String id)
getForwardFilters
in interface CastService
public void childAdded(rice.p2p.scribe.Topic topic, rice.p2p.commonapi.NodeHandle child)
childAdded
in interface rice.p2p.scribe.ScribeClient
childAdded
in interface rice.p2p.scribe.ScribeMultiClient
public void childRemoved(rice.p2p.scribe.Topic topic, rice.p2p.commonapi.NodeHandle child)
childRemoved
in interface rice.p2p.scribe.ScribeClient
childRemoved
in interface rice.p2p.scribe.ScribeMultiClient
public void subscribeFailed(rice.p2p.scribe.Topic topic)
subscribeFailed
in interface rice.p2p.scribe.ScribeClient
subscribeFailed
in interface rice.p2p.scribe.ScribeMultiClient
public void subscribeFailed(java.util.Collection<rice.p2p.scribe.Topic> topics)
subscribeFailed
in interface rice.p2p.scribe.ScribeMultiClient
public void subscribeSuccess(java.util.Collection<rice.p2p.scribe.Topic> topics)
subscribeSuccess
in interface rice.p2p.scribe.ScribeMultiClient
public boolean isRoot(java.lang.String subject)
CastService
isRoot
in interface CastService
public rice.p2p.commonapi.NodeHandle getParent(java.lang.String subject)
getParent
in interface CastService
public java.util.Collection<rice.p2p.commonapi.NodeHandle> getChildren(java.lang.String subject)
getChildren
in interface CastService
public rice.p2p.commonapi.NodeHandle getLocalNodeHandle()
getLocalNodeHandle
in interface CastService
public java.util.Collection<rice.p2p.commonapi.NodeHandle> getNeighbours(int num, boolean ordered)
getNeighbours
in interface CastService
public java.util.Collection<rice.p2p.commonapi.NodeHandle> getReplicaSet(rice.p2p.commonapi.Id id, int num)
getReplicaSet
in interface CastService
public rice.p2p.commonapi.IdRange getRange(rice.p2p.commonapi.NodeHandle handle, int rank, rice.p2p.commonapi.Id lkey)
getRange
in interface CastService
public void close()
close
in interface CastService
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |