jade.core
Class BaseNode

java.lang.Object
  extended by jade.core.BaseNode
All Implemented Interfaces:
Node, java.io.Serializable

public abstract class BaseNode
extends java.lang.Object
implements Node, Serializable

This class provides a partial implementation of the Node interface. Concrete IMTPs will have to provide a full implementation of the Node interface, possibly by subclassing this class.

Author:
Giovanni Rimassa - FRAMeTech s.r.l.
See Also:
Serialized Form

Field Summary
protected  ServiceManager myServiceManager
           
 
Constructor Summary
BaseNode(java.lang.String name, boolean hasPM)
           
 
Method Summary
 void exportSlice(java.lang.String serviceName, Service.Slice localSlice)
           
 java.lang.String getName()
           
protected  Service.Slice getSlice(java.lang.String serviceName)
           
 boolean hasPlatformManager()
           
 void platformManagerDead(java.lang.String deadPMAddr, java.lang.String notifyingPMAddr)
           
 java.lang.Object serveHorizontalCommand(HorizontalCommand cmd)
          Provides an IMTP independent implementation for the horizontal command serving mechanism.
 void setCommandProcessor(jade.core.CommandProcessor cp)
           
 void setName(java.lang.String name)
           
 void setServiceManager(ServiceManager mgr)
           
 java.lang.String toString()
           
 void unexportSlice(java.lang.String serviceName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface jade.core.Node
accept, exit, interrupt, ping
 

Field Detail

myServiceManager

protected transient ServiceManager myServiceManager
Constructor Detail

BaseNode

public BaseNode(java.lang.String name,
                boolean hasPM)
Method Detail

setName

public void setName(java.lang.String name)
Specified by:
setName in interface Node

getName

public java.lang.String getName()
Specified by:
getName in interface Node

hasPlatformManager

public boolean hasPlatformManager()
Specified by:
hasPlatformManager in interface Node

exportSlice

public void exportSlice(java.lang.String serviceName,
                        Service.Slice localSlice)
Specified by:
exportSlice in interface Node

unexportSlice

public void unexportSlice(java.lang.String serviceName)
Specified by:
unexportSlice in interface Node

getSlice

protected Service.Slice getSlice(java.lang.String serviceName)

serveHorizontalCommand

public java.lang.Object serveHorizontalCommand(HorizontalCommand cmd)
                                        throws ServiceException
Provides an IMTP independent implementation for the horizontal command serving mechanism. IMTP dependent implementations of the accept() method should invoke this method.

Parameters:
cmd - The horizontal command to process.
Returns:
The object that is the result of processing the command.
Throws:
ServiceException - If the service the command belongs to is not present on this node.

setCommandProcessor

public void setCommandProcessor(jade.core.CommandProcessor cp)

setServiceManager

public void setServiceManager(ServiceManager mgr)

platformManagerDead

public void platformManagerDead(java.lang.String deadPMAddr,
                                java.lang.String notifyingPMAddr)
                         throws IMTPException
Specified by:
platformManagerDead in interface Node
Throws:
IMTPException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object