|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.objectweb.carol.util.configuration.ProtocolConfigurationImpl
This class manage a rmi configuration used by carol.
The configuration is based on a protocol which contains required values and non modified values
| Constructor Summary | |
ProtocolConfigurationImpl(java.lang.String name,
Protocol protocol,
java.util.Properties properties)
Build a new configuration with given parameters |
|
| Method Summary | |
void |
configure(java.util.Properties properties)
Configure this configuration with a given properties object |
protected void |
extractJNDIProperties()
Extract JNDI properties of properties |
java.lang.String |
getHost()
|
protected java.lang.String |
getHostOfUrl(java.lang.String url)
Parses the given url, and returns the hostname If not found, returns localhost |
javax.naming.Context |
getInitialContext(java.util.Hashtable env)
Build an initial context with the given environment using our configuration |
java.lang.String |
getInitialContextFactoryClassName()
MBean method : Gets the InitialContextFactory classname (Context.INITIAL_CONTEXT_FACTORY) |
java.util.Hashtable |
getJndiEnv()
|
java.lang.String |
getName()
|
java.util.List |
getNames()
Gets JNDI names of the context with this configuration |
java.lang.String |
getobjectName()
|
int |
getPort()
|
protected int |
getPortOfUrl(java.lang.String url)
Parses the given url, and returns the port number. |
java.util.Properties |
getProperties()
|
Protocol |
getProtocol()
|
java.lang.String |
getProviderURL()
Gets the provider URL of this configuration (Context.PROVIDER_URL) |
protected java.lang.String |
getValue(java.lang.String key)
Gets value of properties object |
boolean |
iseventProvider()
|
boolean |
isstateManageable()
|
boolean |
isstatisticsProvider()
|
protected void |
parseURL()
Parse URL to extract host and port |
void |
setobjectName(java.lang.String name)
Sets the object name of this mbean |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ProtocolConfigurationImpl(java.lang.String name,
Protocol protocol,
java.util.Properties properties)
throws ConfigurationException
name - the name of this protocol configurationprotocol - the protocol object used by this configurationproperties - for this object
ConfigurationException - if configuration is not correct| Method Detail |
public void configure(java.util.Properties properties)
throws ConfigurationException
configure in interface ProtocolConfigurationproperties - given properties
ConfigurationException - if the given config is invalid
protected void extractJNDIProperties()
throws ConfigurationException
ConfigurationException - if properties are missing
protected void parseURL()
throws ConfigurationException
ConfigurationException - if URL is not correct
public javax.naming.Context getInitialContext(java.util.Hashtable env)
throws javax.naming.NamingException
getInitialContext in interface ProtocolConfigurationenv - parameters for the initial context
javax.naming.NamingException - if the context is not createdpublic Protocol getProtocol()
getProtocol in interface ProtocolConfigurationpublic java.lang.String getName()
getName in interface ProtocolConfigurationpublic java.util.Properties getProperties()
getProperties in interface ProtocolConfigurationpublic java.lang.String getHost()
getHost in interface ProtocolConfigurationpublic int getPort()
getPort in interface ProtocolConfigurationpublic java.lang.String getProviderURL()
ProtocolConfigurationImplMBean
getProviderURL in interface ProtocolConfiguration
protected int getPortOfUrl(java.lang.String url)
throws ConfigurationException
url - given url on which extract port number
ConfigurationException - if URL is invalid
protected java.lang.String getHostOfUrl(java.lang.String url)
throws ConfigurationException
url - given url on which extract hostname
ConfigurationException - if URL is invalid
protected java.lang.String getValue(java.lang.String key)
throws ConfigurationException
key - the key of the properties
ConfigurationException - if properties are missingpublic java.util.Hashtable getJndiEnv()
public java.lang.String getInitialContextFactoryClassName()
getInitialContextFactoryClassName in interface ProtocolConfigurationImplMBean
public java.util.List getNames()
throws javax.naming.NamingException
getNames in interface ProtocolConfigurationImplMBeanjavax.naming.NamingException - if the names cannot be listedpublic java.lang.String getobjectName()
getobjectName in interface ProtocolConfigurationImplMBeanpublic void setobjectName(java.lang.String name)
setobjectName in interface ProtocolConfigurationImplMBeanname - the Object Namepublic boolean iseventProvider()
iseventProvider in interface ProtocolConfigurationImplMBeanpublic boolean isstateManageable()
isstateManageable in interface ProtocolConfigurationImplMBeanpublic boolean isstatisticsProvider()
isstatisticsProvider in interface ProtocolConfigurationImplMBean
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||