Package jade.imtp.rmi
Class RMIIMTPManager
- java.lang.Object
-
- jade.imtp.rmi.RMIIMTPManager
-
- All Implemented Interfaces:
IMTPManager
public class RMIIMTPManager extends Object implements IMTPManager
- Author:
- Giovanni Caire - Telecom Italia Lab, Giovanni Rimassa - FRAMeTech s.r.l.
-
-
Field Summary
Fields Modifier and Type Field Description static StringENABLE_RMI_LOGThis constant is the name of the property whose boolean value indicates whether or not RMI logs have to be enabled (default false)static StringLOCAL_NODE_PORTThis constant is the name of the property whose value contains the TCP port where the local RMI Node is to be exported.static StringLOCAL_SERVICE_MANAGER_PORTThis constant is the name of the property whose value contains the TCP port where a local Service Manager is to be exported (when using JADE fault-tolerant deployment).-
Fields inherited from interface jade.core.IMTPManager
SERVICE_MANAGER_NAME
-
-
Constructor Summary
Constructors Constructor Description RMIIMTPManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancompareAddresses(String addr1, String addr2)Service.SlicecreateSliceProxy(String serviceName, Class itf, Node where)Builds a proxy object for a remote service slice.voidexportPlatformManager(PlatformManager mgr)Makes the platform Service Manager available through this IMTP.RMIClientSocketFactorygetClientSocketFactory()Creates the client socket factory, which will be used to instantiate aUnicastRemoteObject.ListgetLocalAddresses()Return the the List of TransportAddress where this IMTP is waiting for intra-platform remote calls.NodegetLocalNode()Access the node that represents the local JVM.PlatformManagergetPlatformManagerProxy()Retrieve a proxy to the PlatformManager specified in the local ProfilePlatformManagergetPlatformManagerProxy(String addr)Retrieve a proxy to the PlatformManager listening at a given addressRMIServerSocketFactorygetServerSocketFactory()Creates the server socket factory, which will be used to instantiate aUnicastRemoteObject.voidinitialize(Profile p)Initialize this IMTPManagervoidreconnected(PlatformManager pm)Inform the local IMTPManager that this node is now connected to the given PlatformManagervoidshutDown()Release all resources of this IMTPManagerTransportAddressstringToAddr(String url)voidunexportPlatformManager(PlatformManager mgr)Stops making the platform Service Manager available through this IMTP.
-
-
-
Field Detail
-
LOCAL_SERVICE_MANAGER_PORT
public static final String LOCAL_SERVICE_MANAGER_PORT
This constant is the name of the property whose value contains the TCP port where a local Service Manager is to be exported (when using JADE fault-tolerant deployment).- See Also:
- Constant Field Values
-
LOCAL_NODE_PORT
public static final String LOCAL_NODE_PORT
This constant is the name of the property whose value contains the TCP port where the local RMI Node is to be exported.- See Also:
- Constant Field Values
-
ENABLE_RMI_LOG
public static final String ENABLE_RMI_LOG
This constant is the name of the property whose boolean value indicates whether or not RMI logs have to be enabled (default false)- See Also:
- Constant Field Values
-
-
Method Detail
-
initialize
public void initialize(Profile p) throws IMTPException
Description copied from interface:IMTPManagerInitialize this IMTPManager- Specified by:
initializein interfaceIMTPManager- Throws:
IMTPException
-
exportPlatformManager
public void exportPlatformManager(PlatformManager mgr) throws IMTPException
Description copied from interface:IMTPManagerMakes the platform Service Manager available through this IMTP.- Specified by:
exportPlatformManagerin interfaceIMTPManager- Parameters:
mgr- TheServiceManagerimplementation that is to be made available across the network.- Throws:
IMTPException- If something goes wrong in the underlying network transport.
-
unexportPlatformManager
public void unexportPlatformManager(PlatformManager mgr) throws IMTPException
Description copied from interface:IMTPManagerStops making the platform Service Manager available through this IMTP.- Specified by:
unexportPlatformManagerin interfaceIMTPManager- Throws:
IMTPException- If something goes wrong in the underlying network transport.
-
getPlatformManagerProxy
public PlatformManager getPlatformManagerProxy() throws IMTPException
Description copied from interface:IMTPManagerRetrieve a proxy to the PlatformManager specified in the local Profile- Specified by:
getPlatformManagerProxyin interfaceIMTPManager- Throws:
IMTPException- If something goes wrong in the underlying network transport.
-
getPlatformManagerProxy
public PlatformManager getPlatformManagerProxy(String addr) throws IMTPException
Description copied from interface:IMTPManagerRetrieve a proxy to the PlatformManager listening at a given address- Specified by:
getPlatformManagerProxyin interfaceIMTPManager- Throws:
IMTPException- If something goes wrong in the underlying network transport.
-
reconnected
public void reconnected(PlatformManager pm)
Description copied from interface:IMTPManagerInform the local IMTPManager that this node is now connected to the given PlatformManager- Specified by:
reconnectedin interfaceIMTPManager
-
createSliceProxy
public Service.Slice createSliceProxy(String serviceName, Class itf, Node where) throws IMTPException
Description copied from interface:IMTPManagerBuilds a proxy object for a remote service slice.- Specified by:
createSliceProxyin interfaceIMTPManager- Returns:
- A proxy object that can be safely casted to any of the
interfaces in the
itfsarray. - Throws:
IMTPException- If something goes wrong in the underlying network transport.- See Also:
Service
-
getLocalNode
public Node getLocalNode() throws IMTPException
Description copied from interface:IMTPManagerAccess the node that represents the local JVM.- Specified by:
getLocalNodein interfaceIMTPManager- Returns:
- A
Nodeobject, representing the local node of this platform. - Throws:
IMTPException- If something goes wrong in the underlying network transport.
-
shutDown
public void shutDown()
Description copied from interface:IMTPManagerRelease all resources of this IMTPManager- Specified by:
shutDownin interfaceIMTPManager
-
getLocalAddresses
public List getLocalAddresses() throws IMTPException
Description copied from interface:IMTPManagerReturn the the List of TransportAddress where this IMTP is waiting for intra-platform remote calls.- Specified by:
getLocalAddressesin interfaceIMTPManager- Throws:
IMTPException
-
compareAddresses
public boolean compareAddresses(String addr1, String addr2) throws IMTPException
- Throws:
IMTPException
-
getClientSocketFactory
public RMIClientSocketFactory getClientSocketFactory()
Creates the client socket factory, which will be used to instantiate aUnicastRemoteObject.- Returns:
- The client socket factory.
-
getServerSocketFactory
public RMIServerSocketFactory getServerSocketFactory()
Creates the server socket factory, which will be used to instantiate aUnicastRemoteObject.- Returns:
- The server socket factory.
-
stringToAddr
public TransportAddress stringToAddr(String url) throws IMTPException
- Specified by:
stringToAddrin interfaceIMTPManager- Throws:
IMTPException
-
-