Class RmiRegistry
java.lang.Object
java.rmi.server.RemoteObject
java.rmi.server.RemoteServer
java.rmi.server.UnicastRemoteObject
org.palladiosimulator.protocom.framework.java.se.registry.RmiRegistry
- All Implemented Interfaces:
Serializable
,Remote
,IRmiRegistry
RMI registry service for ProtoCom. It can be started on any hardware node of the ProtoCom system.
Ports register themselves at this service using their name and assembly context.
TODO: Split this class into two parts: One for managing remote connection to the registry and one
for the registry service itself.
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
protected static final org.apache.log4j.Logger
Fields inherited from class java.rmi.server.RemoteObject
ref
Fields inherited from interface org.palladiosimulator.protocom.framework.java.se.registry.IRmiRegistry
PCM_EXPERIMENT_MANAGER_REGISTRY, PCM_RMI_REGISTRY
-
Method Summary
Modifier and TypeMethodDescriptionvoid
bindExperimentManager
(IExperimentManager experimentManager) Binds the calling experiment manager to the registry.void
Binds the calling port to the registry.Returns the list of associated experiment managers.static String
getIpFromArguments
(String[] args) Returns an IP from an argument string array or LOCALHOST insteadstatic int
getPortFromArguments
(String[] args) Returns an port number from an argument string array or 1099 insteadstatic int
static String
static Remote
static void
static void
registerPort
(String registryIP, int registryPort, Remote component, String componentName) Registers a port to a RMI registry at the given IP.static void
setRegistryPort
(int configuredRegistryPort) static void
setRemoteAddress
(String configuredRemoteAddr) static void
Methods inherited from class java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, exportObject, exportObject, unexportObject
Methods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLog
-
Field Details
-
LOGGER
protected static final org.apache.log4j.Logger LOGGER -
LOCALHOST
- See Also:
-
-
Method Details
-
bindPort
Description copied from interface:IRmiRegistry
Binds the calling port to the registry.- Specified by:
bindPort
in interfaceIRmiRegistry
- Parameters:
name
- name of the port, including assembly context.portClass
- the port- Throws:
RemoteException
-
startRegistry
public static void startRegistry() -
registerPort
public static void registerPort(String registryIP, int registryPort, Remote component, String componentName) Registers a port to a RMI registry at the given IP. This method remotely calls bindPort.- Parameters:
registryIP
- IP of the registryport
- instance of the portportName
- unique name of the port, using assembly context
-
getIpFromArguments
Returns an IP from an argument string array or LOCALHOST instead- Parameters:
args
-- Returns:
-
getPortFromArguments
Returns an port number from an argument string array or 1099 instead- Parameters:
args
-- Returns:
-
lookup
- Parameters:
name
-- Returns:
-
getRemoteAddress
-
setRemoteAddress
-
getRegistryPort
public static int getRegistryPort() -
setRegistryPort
public static void setRegistryPort(int configuredRegistryPort) -
main
-
bindExperimentManager
Description copied from interface:IRmiRegistry
Binds the calling experiment manager to the registry.- Specified by:
bindExperimentManager
in interfaceIRmiRegistry
- Parameters:
experimentManager
- the manager- Throws:
RemoteException
-
getExperimentManagers
Description copied from interface:IRmiRegistry
Returns the list of associated experiment managers.- Specified by:
getExperimentManagers
in interfaceIRmiRegistry
- Returns:
-