mam.internetworking
Class Node

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--mam.internetworking.Node

public class Node
extends Thread
implements Serializable

Description of the Class

Author:
igasp
created March 8, 2001

Field Summary
 (package private) final static StringCONFIGURATION_LOCAL_ADDRESS_ATTRIBUTE
           
 (package private) final static StringCONFIGURATION_PORT_ATTRIBUTE
           
 (package private) final static StringCONFIGURATION_ROUTE_RECALCULATION_INTERVAL_ATTRIBUTE
           
 (package private) final static StringCONFIGURATION_ROUTE_REFRESH_INTERVAL_ATTRIBUTE
           
 (package private) final static StringCONFIGURATION_ROUTING_PATH_NEXT_STOP_ATTRIBUTE
           
 (package private) final static StringCONFIGURATION_ROUTING_PATH_STRENGTH_ATTRIBUTE
           
 (package private) final static StringCONFIGURATION_ROUTING_PATH_TAG
           
 (package private) final static StringCONFIGURATION_ROUTING_TAG_ATTRIBUTE
           
 (package private) final static StringCONFIGURATION_TAGGED_ROUTING_PATHS_TAG
           
 final static StringDEFAULT_CONFIGURATION_FILENAME
          Description of the Field
 (package private) final static doubleDEFAULT_NEW_ROUTE_STRENGTH
           
 (package private) final static intDEFAULT_PORT
           
 final static StringDEFAULT_TAG_NAME
          Description of the Field
 (package private) final static RoutingTagLOCAL_NODE_ROUTING_TAG
           
 (package private) static CategoryLog
           
 protected Collectionm_agentFacilities
          Description of the Field
 protected Stringm_configurationFilename
          Description of the Field
 protected booleanm_debug
          Description of the Field
 protected Stringm_localAddress
           
 (package private) static Nodem_localNode
           
 protected URLm_localUrl
          Description of the Field
 protected booleanm_persistLocalAddress
           
 protected intm_port
          Description of the Field
 protected booleanm_quit
          Description of the Field
 protected intm_routedMessageCount
          Description of the Field
 protected AgedSetm_routedMessages
          Description of the Field
 (package private) RouteManagerm_routeManager
           
 protected intm_routeRecalculationInterval
          Description of the Field
 (package private) RouteRefresherm_routeRefresher
           
 protected intm_routeRefreshInterval
          Description of the Field
 protected RoutingTablem_routingTable
          Description of the Field
 protected booleanm_shutdownComplete
          Description of the Field
 (package private) SocketDaemonm_socketDaemon
           
 (package private) final static intMAX_GRACE_PERIOD
           
 protected final static intRECEIVED_MESSAGES_HALF_LIFE_QUEUE_SIZE
          Description of the Field

Fields inherited from class java.lang.Thread
MIN_PRIORITY, NORM_PRIORITY, MAX_PRIORITY

Constructor Summary
Node()
          Constructor for the Node object
Node(String filename)
          Constructor for the Node object

Method Summary
 synchronized voidaddFacility(Facility agentFacility)
          Adds a feature to the Facility attribute of the Node object
 protected voidforwardAgentMessage(RoutingTag destinationTag, AgentMessage agentMessage)
          Description of the Method
 protected StringgetConfigurationFilename()
          Gets the ConfigurationFilename attribute of the Node object
 static NodegetLocalNode()
          Gets the LocalNode attribute of the Node class
 static NodegetLocalNode(String filename)
          Gets the LocalNode attribute of the Node class
 synchronized AgedSetgetRoutedMessages()
          Gets the RoutedMessages attribute of the Node object
 protected RoutingTablegetRoutingTable()
          Gets the RoutingTable attribute of the Node object
 booleangetShutdownComplete()
          Gets the ShutdownComplete attribute of the Node object
 protected synchronized voidhandleAgentMessageReceived(AgentMessage incomingMessage)
          Description of the Method
 protected voidload()
          Description of the Method
 synchronized voidregisterTag(RoutingTag routingTag)
          Description of the Method
 synchronized voidremoveFacility(Facility agentFacility)
          Description of the Method
 voidrun()
          Main processing method for the Node object
 protected voidsave()
          Description of the Method
 synchronized voidsendAgentMessage(RoutingTag destinationTag, AgentMessage agentMessage)
          Description of the Method
 protected synchronized voidsendMessage(RoutableMessage message)
          Description of the Method
 protected synchronized voidsendMessage(URL destination, RoutableMessage message)
          Description of the Method
 protected voidsetConfigurationFilename(String configurationFilename)
          Sets the ConfigurationFilename attribute of the Node object
 protected voidsetShutdownComplete()
          Sets the ShutdownComplete attribute of the Node object
 protected voidshutdown()
          Description of the Method
 synchronized voidsignalQuit()
          Description of the Method
 protected voidstartUp()
          Description of the Method
 voidstrengthenRoutingPath(RoutingTag tag, RemoteableRoutingPath path, double weight)
          Description of the Method
 voidweakenRoutingPath(RoutingTag tag, RemoteableRoutingPath path, double weight)
          Description of the Method

Methods inherited from class java.lang.Thread
currentThread, yield, sleep, sleep, start, stop, stop, interrupt, interrupted, isInterrupted, destroy, isAlive, suspend, resume, setPriority, getPriority, setName, getName, getThreadGroup, activeCount, enumerate, countStackFrames, join, join, join, dumpStack, setDaemon, isDaemon, checkAccess, toString, getContextClassLoader, setContextClassLoader

Methods inherited from class java.lang.Object
getClass, hashCode, equals, clone, notify, notifyAll, wait, wait, wait, finalize

Field Detail

CONFIGURATION_LOCAL_ADDRESS_ATTRIBUTE

final static String CONFIGURATION_LOCAL_ADDRESS_ATTRIBUTE

CONFIGURATION_PORT_ATTRIBUTE

final static String CONFIGURATION_PORT_ATTRIBUTE

CONFIGURATION_ROUTE_RECALCULATION_INTERVAL_ATTRIBUTE

final static String CONFIGURATION_ROUTE_RECALCULATION_INTERVAL_ATTRIBUTE

CONFIGURATION_ROUTE_REFRESH_INTERVAL_ATTRIBUTE

final static String CONFIGURATION_ROUTE_REFRESH_INTERVAL_ATTRIBUTE

CONFIGURATION_ROUTING_PATH_NEXT_STOP_ATTRIBUTE

final static String CONFIGURATION_ROUTING_PATH_NEXT_STOP_ATTRIBUTE

CONFIGURATION_ROUTING_PATH_STRENGTH_ATTRIBUTE

final static String CONFIGURATION_ROUTING_PATH_STRENGTH_ATTRIBUTE

CONFIGURATION_ROUTING_PATH_TAG

final static String CONFIGURATION_ROUTING_PATH_TAG

CONFIGURATION_ROUTING_TAG_ATTRIBUTE

final static String CONFIGURATION_ROUTING_TAG_ATTRIBUTE

CONFIGURATION_TAGGED_ROUTING_PATHS_TAG

final static String CONFIGURATION_TAGGED_ROUTING_PATHS_TAG

DEFAULT_CONFIGURATION_FILENAME

public final static String DEFAULT_CONFIGURATION_FILENAME
Description of the Field
Since:

DEFAULT_NEW_ROUTE_STRENGTH

final static double DEFAULT_NEW_ROUTE_STRENGTH

DEFAULT_PORT

final static int DEFAULT_PORT

DEFAULT_TAG_NAME

public final static String DEFAULT_TAG_NAME
Description of the Field
Since:

LOCAL_NODE_ROUTING_TAG

final static RoutingTag LOCAL_NODE_ROUTING_TAG

Log

static Category Log

m_agentFacilities

protected Collection m_agentFacilities
Description of the Field
Since:

m_configurationFilename

protected String m_configurationFilename
Description of the Field
Since:

m_debug

protected boolean m_debug
Description of the Field
Since:

m_localAddress

protected String m_localAddress

m_localNode

static Node m_localNode

m_localUrl

protected URL m_localUrl
Description of the Field
Since:

m_persistLocalAddress

protected boolean m_persistLocalAddress

m_port

protected int m_port
Description of the Field
Since:

m_quit

protected boolean m_quit
Description of the Field
Since:

m_routedMessageCount

protected int m_routedMessageCount
Description of the Field
Since:

m_routedMessages

protected AgedSet m_routedMessages
Description of the Field
Since:

m_routeManager

RouteManager m_routeManager

m_routeRecalculationInterval

protected int m_routeRecalculationInterval
Description of the Field
Since:

m_routeRefresher

RouteRefresher m_routeRefresher

m_routeRefreshInterval

protected int m_routeRefreshInterval
Description of the Field
Since:

m_routingTable

protected RoutingTable m_routingTable
Description of the Field
Since:

m_shutdownComplete

protected boolean m_shutdownComplete
Description of the Field
Since:

m_socketDaemon

SocketDaemon m_socketDaemon

MAX_GRACE_PERIOD

final static int MAX_GRACE_PERIOD

RECEIVED_MESSAGES_HALF_LIFE_QUEUE_SIZE

protected final static int RECEIVED_MESSAGES_HALF_LIFE_QUEUE_SIZE
Description of the Field
Since:
Constructor Detail

Node

public Node()
Constructor for the Node object
Since:

Node

public Node(String filename)
Constructor for the Node object
Parameters:
filename - Description of Parameter
Since:
Method Detail

addFacility

public synchronized void addFacility(Facility agentFacility)
Adds a feature to the Facility attribute of the Node object
Parameters:
agentFacility - The feature to be added to the Facility attribute
Since:

forwardAgentMessage

protected void forwardAgentMessage(RoutingTag destinationTag, AgentMessage agentMessage)
Description of the Method
Parameters:
destinationTag - Description of Parameter
agentMessage - Description of Parameter
Since:

getConfigurationFilename

protected String getConfigurationFilename()
Gets the ConfigurationFilename attribute of the Node object
Returns: The ConfigurationFilename value
Since:

getLocalNode

public static Node getLocalNode()
Gets the LocalNode attribute of the Node class
Returns: The LocalNode value
Since:

getLocalNode

public static Node getLocalNode(String filename)
Gets the LocalNode attribute of the Node class
Parameters:
filename - Description of Parameter
Returns: The LocalNode value
Since:

getRoutedMessages

public synchronized AgedSet getRoutedMessages()
Gets the RoutedMessages attribute of the Node object
Returns: The RoutedMessages value
Since:

getRoutingTable

protected RoutingTable getRoutingTable()
Gets the RoutingTable attribute of the Node object
Returns: The RoutingTable value
Since:

getShutdownComplete

public boolean getShutdownComplete()
Gets the ShutdownComplete attribute of the Node object
Returns: The ShutdownComplete value
Since:

handleAgentMessageReceived

protected synchronized void handleAgentMessageReceived(AgentMessage incomingMessage)
Description of the Method
Parameters:
incomingMessage - Description of Parameter
Since:

load

protected void load()
Description of the Method
Since:

registerTag

public synchronized void registerTag(RoutingTag routingTag)
Description of the Method
Parameters:
routingTag - Description of Parameter
Since:

removeFacility

public synchronized void removeFacility(Facility agentFacility)
Description of the Method
Parameters:
agentFacility - Description of Parameter
Since:

run

public void run()
Main processing method for the Node object
Since:

save

protected void save()
Description of the Method
Since:

sendAgentMessage

public synchronized void sendAgentMessage(RoutingTag destinationTag, AgentMessage agentMessage)
Description of the Method
Parameters:
destinationTag - Description of Parameter
agentMessage - Description of Parameter
Since:

sendMessage

protected synchronized void sendMessage(RoutableMessage message)
Description of the Method
Parameters:
message - Description of Parameter
Since:

sendMessage

protected synchronized void sendMessage(URL destination, RoutableMessage message)
Description of the Method
Parameters:
destination - Description of Parameter
message - Description of Parameter
Since:

setConfigurationFilename

protected void setConfigurationFilename(String configurationFilename)
Sets the ConfigurationFilename attribute of the Node object
Parameters:
configurationFilename - The new ConfigurationFilename value
Since:

setShutdownComplete

protected void setShutdownComplete()
Sets the ShutdownComplete attribute of the Node object
Since:

shutdown

protected void shutdown()
Description of the Method
Since:

signalQuit

public synchronized void signalQuit()
Description of the Method
Since:

startUp

protected void startUp()
Description of the Method
Since:

strengthenRoutingPath

public void strengthenRoutingPath(RoutingTag tag, RemoteableRoutingPath path, double weight)
Description of the Method
Parameters:
tag - Description of Parameter
path - Description of Parameter
weight - Description of Parameter
Since:

weakenRoutingPath

public void weakenRoutingPath(RoutingTag tag, RemoteableRoutingPath path, double weight)
Description of the Method
Parameters:
tag - Description of Parameter
path - Description of Parameter
weight - Description of Parameter
Since: