jade.core
Class PlatformManagerImpl
java.lang.Object
jade.core.PlatformManagerImpl
- All Implemented Interfaces:
- PlatformManager
public class PlatformManagerImpl
- extends java.lang.Object
- implements PlatformManager
The ServiceManagerImpl class is the actual
implementation of JADE platform Service Manager and
Service Finder components. It holds a set of services and
manages them.
- Author:
- Giovanni Caire - TILAB, Giovanni Rimassa - FRAMeTech s.r.l.
|
Method Summary |
void |
addMainContainerNode(NodeDescriptor dsc,
java.util.Vector services)
This method is invoked by the MainReplicationService when a new MainReplication slice is added
and has the effect of issuing a NEW_NODE VCommand and one NEW_SLICE VCommand for each service
installed in the node hosting the new MainReplication slice. |
java.lang.String |
addNode(NodeDescriptor dsc,
java.util.Vector nodeServices,
boolean propagated)
|
void |
addReplica(java.lang.String newAddr,
boolean propagated)
|
void |
addSlice(ServiceDescriptor service,
NodeDescriptor dsc,
boolean propagated)
|
void |
adopt(Node n,
Node[] children)
|
java.util.Vector |
findAllSlices(java.lang.String serviceKey)
|
Service.Slice |
findSlice(java.lang.String serviceKey,
java.lang.String sliceKey)
|
java.lang.String |
getLocalAddress()
|
java.lang.String |
getPlatformName()
|
void |
ping()
|
void |
removeNode(NodeDescriptor dsc,
boolean propagated)
|
void |
removeReplica(java.lang.String address,
boolean propagated)
|
void |
removeSlice(java.lang.String serviceKey,
java.lang.String sliceKey,
boolean propagated)
|
void |
setLocalAddress(java.lang.String addr)
|
void |
setPlatformName(java.lang.String name)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
setPlatformName
public void setPlatformName(java.lang.String name)
throws IMTPException
- Throws:
IMTPException
getPlatformName
public java.lang.String getPlatformName()
throws IMTPException
- Specified by:
getPlatformName in interface PlatformManager
- Throws:
IMTPException
getLocalAddress
public java.lang.String getLocalAddress()
- Specified by:
getLocalAddress in interface PlatformManager
setLocalAddress
public void setLocalAddress(java.lang.String addr)
- Specified by:
setLocalAddress in interface PlatformManager
addNode
public java.lang.String addNode(NodeDescriptor dsc,
java.util.Vector nodeServices,
boolean propagated)
throws IMTPException,
ServiceException,
jade.security.JADESecurityException
- Specified by:
addNode in interface PlatformManager
- Parameters:
dsc - The Descriptor of the new Nodeservices - The services currently installed on the new Nodepropagated - Flag indicating whether the new-node event
was a propagated event within the replication mechanism
- Throws:
IMTPException
ServiceException
jade.security.JADESecurityException
removeNode
public void removeNode(NodeDescriptor dsc,
boolean propagated)
throws IMTPException,
ServiceException
- Specified by:
removeNode in interface PlatformManager
- Throws:
IMTPException
ServiceException
addSlice
public void addSlice(ServiceDescriptor service,
NodeDescriptor dsc,
boolean propagated)
throws IMTPException,
ServiceException
- Specified by:
addSlice in interface PlatformManager
- Throws:
IMTPException
ServiceException
removeSlice
public void removeSlice(java.lang.String serviceKey,
java.lang.String sliceKey,
boolean propagated)
throws IMTPException,
ServiceException
- Specified by:
removeSlice in interface PlatformManager
- Throws:
IMTPException
ServiceException
addReplica
public void addReplica(java.lang.String newAddr,
boolean propagated)
throws IMTPException,
ServiceException
- Specified by:
addReplica in interface PlatformManager
- Throws:
IMTPException
ServiceException
removeReplica
public void removeReplica(java.lang.String address,
boolean propagated)
throws IMTPException,
ServiceException
- Specified by:
removeReplica in interface PlatformManager
- Throws:
IMTPException
ServiceException
adopt
public void adopt(Node n,
Node[] children)
throws IMTPException
- Specified by:
adopt in interface PlatformManager
- Throws:
IMTPException
ping
public void ping()
throws IMTPException
- Specified by:
ping in interface PlatformManager
- Throws:
IMTPException
addMainContainerNode
public void addMainContainerNode(NodeDescriptor dsc,
java.util.Vector services)
throws jade.security.JADESecurityException
- This method is invoked by the MainReplicationService when a new MainReplication slice is added
and has the effect of issuing a NEW_NODE VCommand and one NEW_SLICE VCommand for each service
installed in the node hosting the new MainReplication slice. This allows services to propagate
service specific information to their new slice
- Throws:
jade.security.JADESecurityException
findSlice
public Service.Slice findSlice(java.lang.String serviceKey,
java.lang.String sliceKey)
throws IMTPException,
ServiceException
- Specified by:
findSlice in interface PlatformManager
- Throws:
IMTPException
ServiceException
findAllSlices
public java.util.Vector findAllSlices(java.lang.String serviceKey)
throws IMTPException,
ServiceException
- Specified by:
findAllSlices in interface PlatformManager
- Throws:
IMTPException
ServiceException