org.objectweb.carol.util.configuration
Class Protocol

java.lang.Object
  extended byorg.objectweb.carol.util.configuration.Protocol

public class Protocol
extends java.lang.Object

This class defines commons attributes of a protocol for Carol.
An rmi configuration relies on a protocol by specifying properties. For example a protocol is composed of a Prodelegate Implementation class, a registry class, etc.
But the PROVIDER_URL could be different. This is done in Configuration object. (one protocol could be associated to different configurations)
ie : JRMP --> jrmp1 with localhost:1099, jrmp2 with localhost:1100

Author:
Florent Benoit

Constructor Summary
Protocol(java.lang.String name, java.util.Properties properties)
          Build a new protocol object with given parameters
 
Method Summary
 void addInterceptor(java.lang.String interceptorInitializer)
          Add an interceptor for the given protocol
 java.lang.String getInitialContextFactoryClassName()
           
 java.lang.String getName()
           
 javax.rmi.CORBA.PortableRemoteObjectDelegate getPortableRemoteObject()
           
 java.lang.String getRegistryClassName()
           
protected  java.lang.String getValue(java.lang.String key)
          Gets value of properties object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Protocol

public Protocol(java.lang.String name,
                java.util.Properties properties)
         throws ConfigurationException
Build a new protocol object with given parameters

Parameters:
name - the name of this protocol
properties - properties of this protocol
Throws:
ConfigurationException - if properties are missing
Method Detail

getValue

protected java.lang.String getValue(java.lang.String key)
                             throws ConfigurationException
Gets value of properties object

Parameters:
key - the key of the properties
Returns:
value stored in a property object
Throws:
ConfigurationException - if properties are missing

addInterceptor

public void addInterceptor(java.lang.String interceptorInitializer)
Add an interceptor for the given protocol

Parameters:
interceptorInitializer - the class of the interceptor initializer

getInitialContextFactoryClassName

public java.lang.String getInitialContextFactoryClassName()
Returns:
the initialContextFactory ClassName.

getRegistryClassName

public java.lang.String getRegistryClassName()
Returns:
the registry ClassName.

getPortableRemoteObject

public javax.rmi.CORBA.PortableRemoteObjectDelegate getPortableRemoteObject()
Returns:
the portableRemoteObject delegate.

getName

public java.lang.String getName()
Returns:
the name of this protocol.