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
FieldsModifier and TypeFieldDescriptionstatic final Stringprotected static final org.apache.log4j.LoggerFields inherited from class java.rmi.server.RemoteObject
refFields inherited from interface org.palladiosimulator.protocom.framework.java.se.registry.IRmiRegistry
PCM_EXPERIMENT_MANAGER_REGISTRY, PCM_RMI_REGISTRY -
Method Summary
Modifier and TypeMethodDescriptionvoidbindExperimentManager(IExperimentManager experimentManager) Binds the calling experiment manager to the registry.voidBinds the calling port to the registry.Returns the list of associated experiment managers.static StringgetIpFromArguments(String[] args) Returns an IP from an argument string array or LOCALHOST insteadstatic intgetPortFromArguments(String[] args) Returns an port number from an argument string array or 1099 insteadstatic intstatic Stringstatic Remotestatic voidstatic voidregisterPort(String registryIP, int registryPort, Remote component, String componentName) Registers a port to a RMI registry at the given IP.static voidsetRegistryPort(int configuredRegistryPort) static voidsetRemoteAddress(String configuredRemoteAddr) static voidMethods inherited from class java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, exportObject, exportObject, unexportObjectMethods 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:IRmiRegistryBinds the calling port to the registry.- Specified by:
bindPortin 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:IRmiRegistryBinds the calling experiment manager to the registry.- Specified by:
bindExperimentManagerin interfaceIRmiRegistry- Parameters:
experimentManager- the manager- Throws:
RemoteException
-
getExperimentManagers
Description copied from interface:IRmiRegistryReturns the list of associated experiment managers.- Specified by:
getExperimentManagersin interfaceIRmiRegistry- Returns:
-