|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.hypergraphdb.peer.jxta.JXTAPeerInterface
public class JXTAPeerInterface
| Constructor Summary | |
|---|---|
JXTAPeerInterface()
|
|
| Method Summary | |
|---|---|
void |
broadcast(java.lang.Object msg)
Broadcast a message to all members of this peer's group. |
boolean |
configure(java.util.Map<java.lang.String,java.lang.Object> configuration)
Because implementors can be of any type, the configuration is an Object, no constraints to impose here as there is no common set of configuration properties. |
PeerNetwork |
getPeerNetwork()
|
HyperGraphPeer |
getThisPeer()
Return the HyperGraphPeer to which this PeerInterface
is bound. |
void |
handleRequest(java.net.Socket socket)
|
PeerFilter |
newFilterActivity(PeerFilterEvaluator evaluator)
|
PeerRelatedActivityFactory |
newSendActivityFactory()
|
void |
run(java.util.concurrent.ExecutorService executorService)
Execute the message handling loop of this interface. |
java.util.concurrent.Future<java.lang.Boolean> |
send(java.lang.Object target,
java.lang.Object msg)
|
void |
setMessageHandler(MessageHandler messageHandler)
There is only one MessageHandler for incoming message through
a given PeerInterface and this method sets it for this one. |
void |
setThisPeer(HyperGraphPeer thisPeer)
Internally used to initialize the PeerInterface, don't call in application code. |
void |
stop()
Stop the PeerInterface - no more messages are going to be
received or sent. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JXTAPeerInterface()
| Method Detail |
|---|
public boolean configure(java.util.Map<java.lang.String,java.lang.Object> configuration)
PeerInterface
configure in interface PeerInterfacepublic void stop()
PeerInterface
Stop the PeerInterface - no more messages are going to be
received or sent.
stop in interface PeerInterfacepublic void setMessageHandler(MessageHandler messageHandler)
PeerInterface
There is only one MessageHandler for incoming message through
a given PeerInterface and this method sets it for this one.
setMessageHandler in interface PeerInterfacepublic void run(java.util.concurrent.ExecutorService executorService)
PeerInterface
Execute the message handling loop of this interface. This method is akin to a vanilla
run, but with the additional constraint that a specific
ExecutorService must be used for the main message handling thread as
well as for all activities triggered by this PeerInterface.
run in interface PeerInterfacepublic void handleRequest(java.net.Socket socket)
handleRequest in interface JXTARequestHandlerpublic HyperGraphPeer getThisPeer()
PeerInterface
Return the HyperGraphPeer to which this PeerInterface
is bound.
getThisPeer in interface PeerInterfacepublic void setThisPeer(HyperGraphPeer thisPeer)
PeerInterface
Internally used to initialize the PeerInterface, don't call in application code.
setThisPeer in interface PeerInterfacepublic PeerFilter newFilterActivity(PeerFilterEvaluator evaluator)
newFilterActivity in interface PeerInterfacepublic PeerRelatedActivityFactory newSendActivityFactory()
newSendActivityFactory in interface PeerInterface
public java.util.concurrent.Future<java.lang.Boolean> send(java.lang.Object target,
java.lang.Object msg)
send in interface PeerInterfacepublic void broadcast(java.lang.Object msg)
PeerInterfaceBroadcast a message to all members of this peer's group.
broadcast in interface PeerInterfacepublic PeerNetwork getPeerNetwork()
getPeerNetwork in interface PeerInterface
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||