org.asunder
Class AsunderNode

java.lang.Object
  extended by org.asunder.AsunderNode
All Implemented Interfaces:
DHTNode

public class AsunderNode
extends java.lang.Object
implements DHTNode

Author:
simms2k

Constructor Summary
AsunderNode(AsunderConfig config, AsunderCache cache, PastryNode kbrNode)
          Creates a new instance of AsunderNode
 
Method Summary
 void deliver(Id id, Message message)
          Deliver a message bound for this kbr application
 boolean forward(RouteMessage routeMessage)
          AsunderMessage's are always routed directly to peers, so forwarding should not occur but due to the pastry implementation, sent and delivered messages cause forward() to fire.
 DHTCache getCache()
           
 NodeHandleIterator getCandidates(Id targetId)
           
 AsunderConfig getConfig()
           
 void getContent(DHTContentKey contentKey, long timeout, DHTGetListener listener)
          Search for content on the DHT with a newly generated messageId
 Id getId()
           
 LeafSet getLeafSet()
           
 void initiateJoin(NodeHandle bootstrap)
           
 void putContent(DHTContent content, long timeout, DHTPutListener listener)
          Publish content on the DHT using a new messageId most commonly used by a higher level app running this node
 void setLogLevel(int logLevel)
           
 void update(NodeHandle handle, boolean joined)
          Notification of nodes joining/leaving.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AsunderNode

public AsunderNode(AsunderConfig config,
                   AsunderCache cache,
                   PastryNode kbrNode)
Creates a new instance of AsunderNode

Method Detail

getId

public Id getId()

initiateJoin

public void initiateJoin(NodeHandle bootstrap)

getLeafSet

public LeafSet getLeafSet()

getConfig

public AsunderConfig getConfig()

getCache

public DHTCache getCache()
Specified by:
getCache in interface DHTNode

setLogLevel

public void setLogLevel(int logLevel)

getCandidates

public NodeHandleIterator getCandidates(Id targetId)

getContent

public void getContent(DHTContentKey contentKey,
                       long timeout,
                       DHTGetListener listener)
Search for content on the DHT with a newly generated messageId

Specified by:
getContent in interface DHTNode

putContent

public void putContent(DHTContent content,
                       long timeout,
                       DHTPutListener listener)
Publish content on the DHT using a new messageId most commonly used by a higher level app running this node

Specified by:
putContent in interface DHTNode

deliver

public void deliver(Id id,
                    Message message)
Deliver a message bound for this kbr application

See Also:
Application

forward

public boolean forward(RouteMessage routeMessage)
AsunderMessage's are always routed directly to peers, so forwarding should not occur but due to the pastry implementation, sent and delivered messages cause forward() to fire. In any case, just let it through

See Also:
Application

update

public void update(NodeHandle handle,
                   boolean joined)
Notification of nodes joining/leaving. For the moment, AsunderNode doesn't pay attention to this

See Also:
Application