cz.cuni.amis.pogamut.base.utils
Class DefaultPogamutPlatform
java.lang.Object
cz.cuni.amis.pogamut.base.utils.DefaultPogamutPlatform
- All Implemented Interfaces:
- PogamutPlatform
public class DefaultPogamutPlatform
- extends Object
- implements PogamutPlatform
Singleton for platform wide settings like: JMX, properties loading.
- Author:
- Ik
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
mbsc
protected MBeanServerConnection mbsc
DefaultPogamutPlatform
public DefaultPogamutPlatform()
getMBeanServerURL
public JMXServiceURL getMBeanServerURL()
throws cz.cuni.amis.utils.exception.PogamutException
- Specified by:
getMBeanServerURL
in interface PogamutPlatform
- Throws:
cz.cuni.amis.utils.exception.PogamutException
getRMIPort
protected int getRMIPort()
throws cz.cuni.amis.utils.exception.PogamutException
- Throws:
cz.cuni.amis.utils.exception.PogamutException
getMBeanServer
public MBeanServer getMBeanServer()
throws cz.cuni.amis.utils.exception.PogamutException
- Returns MBeans server for the Pogamut Platform. All MBeans connected from
the platform should be registered in this server. There is also default
RMI connector for this server running on service:jmx:rmi:///jndi/rmi://localhost:9999/server
- Specified by:
getMBeanServer
in interface PogamutPlatform
- Returns:
-
- Throws:
cz.cuni.amis.utils.exception.PogamutException
close
public void close()
throws cz.cuni.amis.utils.exception.PogamutException
- Description copied from interface:
PogamutPlatform
- Used to shutdown the Pogamut platform - currently it only stops JMX.
- Specified by:
close
in interface PogamutPlatform
- Throws:
cz.cuni.amis.utils.exception.PogamutException
getProperty
public String getProperty(String key,
String def)
- Specified by:
getProperty
in interface PogamutPlatform
- Parameters:
key
- def
-
- Returns:
- See Also:
DefaultPogamutPlatform.getProperty(String)
getProperty
public String getProperty(String key)
- Returns property value. The search order for finding the value is determined dynamicaly by the SPI.
There are allways these sources of properties that are accesed in this order:
- Get property from -D option supplied when running the JVM
- Get the property from system properties (eg. specified by
set MY_PROP=hello
)
- Load property from PogamutPlatformCustom.properties file in processe's working directory
- Load property from default platform property file inside Gavialib
However other sources may be added through SPI.
- Specified by:
getProperty
in interface PogamutPlatform
- Parameters:
key
-
- Returns:
- null if no such property was found
getMBeanServerConnection
public MBeanServerConnection getMBeanServerConnection()
throws cz.cuni.amis.utils.exception.PogamutException
- Specified by:
getMBeanServerConnection
in interface PogamutPlatform
- Returns:
- Connection to a remote MBeanServer
- Throws:
cz.cuni.amis.utils.exception.PogamutException
getIntProperty
public int getIntProperty(String key)
- Specified by:
getIntProperty
in interface PogamutPlatform
getBooleanProperty
public boolean getBooleanProperty(String key)
- Specified by:
getBooleanProperty
in interface PogamutPlatform
Copyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.