Package jade.core
Class PlatformManagerImpl
- java.lang.Object
-
- jade.core.PlatformManagerImpl
-
- All Implemented Interfaces:
PlatformManager
public class PlatformManagerImpl extends Object implements PlatformManager
TheServiceManagerImplclass 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.
-
-
Field Summary
-
Fields inherited from interface jade.core.PlatformManager
AUX_NODE_NAME, NO_NAME
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddMainContainerNode(NodeDescriptor dsc, 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.StringaddNode(NodeDescriptor dsc, Vector nodeServices, boolean propagated)voidaddReplica(String newAddr, boolean propagated)voidaddSlice(ServiceDescriptor service, NodeDescriptor dsc, boolean propagated)voidadopt(Node n, Node[] children)VectorfindAllSlices(String serviceKey)Service.SlicefindSlice(String serviceKey, String sliceKey)StringgetLocalAddress()StringgetPlatformName()voidping()voidremoveNode(NodeDescriptor dsc, boolean propagated)voidremoveReplica(String address, boolean propagated)voidremoveSlice(String serviceKey, String sliceKey, boolean propagated)voidsetLocalAddress(String addr)voidsetPlatformName(String name)
-
-
-
Method Detail
-
setPlatformName
public void setPlatformName(String name) throws IMTPException
- Throws:
IMTPException
-
getPlatformName
public String getPlatformName() throws IMTPException
- Specified by:
getPlatformNamein interfacePlatformManager- Throws:
IMTPException
-
getLocalAddress
public String getLocalAddress()
- Specified by:
getLocalAddressin interfacePlatformManager
-
setLocalAddress
public void setLocalAddress(String addr)
- Specified by:
setLocalAddressin interfacePlatformManager
-
addNode
public String addNode(NodeDescriptor dsc, Vector nodeServices, boolean propagated) throws IMTPException, ServiceException, JADESecurityException
- Specified by:
addNodein interfacePlatformManager- 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:
IMTPExceptionServiceExceptionJADESecurityException
-
removeNode
public void removeNode(NodeDescriptor dsc, boolean propagated) throws IMTPException, ServiceException
- Specified by:
removeNodein interfacePlatformManager- Throws:
IMTPExceptionServiceException
-
addSlice
public void addSlice(ServiceDescriptor service, NodeDescriptor dsc, boolean propagated) throws IMTPException, ServiceException
- Specified by:
addSlicein interfacePlatformManager- Throws:
IMTPExceptionServiceException
-
removeSlice
public void removeSlice(String serviceKey, String sliceKey, boolean propagated) throws IMTPException, ServiceException
- Specified by:
removeSlicein interfacePlatformManager- Throws:
IMTPExceptionServiceException
-
addReplica
public void addReplica(String newAddr, boolean propagated) throws IMTPException, ServiceException
- Specified by:
addReplicain interfacePlatformManager- Throws:
IMTPExceptionServiceException
-
removeReplica
public void removeReplica(String address, boolean propagated) throws IMTPException, ServiceException
- Specified by:
removeReplicain interfacePlatformManager- Throws:
IMTPExceptionServiceException
-
adopt
public void adopt(Node n, Node[] children) throws IMTPException
- Specified by:
adoptin interfacePlatformManager- Throws:
IMTPException
-
ping
public void ping() throws IMTPException- Specified by:
pingin interfacePlatformManager- Throws:
IMTPException
-
addMainContainerNode
public void addMainContainerNode(NodeDescriptor dsc, Vector services) throws 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:
JADESecurityException
-
findSlice
public Service.Slice findSlice(String serviceKey, String sliceKey) throws IMTPException, ServiceException
- Specified by:
findSlicein interfacePlatformManager- Throws:
IMTPExceptionServiceException
-
findAllSlices
public Vector findAllSlices(String serviceKey) throws IMTPException, ServiceException
- Specified by:
findAllSlicesin interfacePlatformManager- Throws:
IMTPExceptionServiceException
-
-