org.objectweb.jonas.registry.carol
Class CarolRegistryService

java.lang.Object
  extended by javax.management.NotificationBroadcasterSupport
      extended by org.objectweb.jonas.management.reconfig.emitter.ReconfigEmitter
          extended by org.objectweb.jonas.service.AbsServiceImpl
              extended by org.objectweb.jonas.registry.carol.CarolRegistryService
All Implemented Interfaces:
NotificationBroadcaster, NotificationEmitter, RegistryService, Service

public class CarolRegistryService
extends AbsServiceImpl
implements RegistryService

Implementation of the RegistryService interface.

Author:
Helene Joanin Contributor(s): Julien Lehembre (Libelis)

Field Summary
static String CLASS
          Registry class property name.
static String COLLOCATED
          Collocated mode.
static String DEFAULT_MODE
          Automatic mode.
static String MODE
          Registry mode property name.
static String REMOTE
          Remote mode.
 
Fields inherited from class org.objectweb.jonas.management.reconfig.emitter.ReconfigEmitter
RECONFIG_TYPE, SAVE_RECONFIG_TYPE
 
Constructor Summary
CarolRegistryService()
           
 
Method Summary
 void doInit(Context ctx)
          Abstract initialization method to be implemented by sub-classes
 void doStart()
          Abstract start-up method to be implemented by sub-classes
 void doStop()
          Abstract method for service stopping to be implemented by sub-classes
 List getActiveProtocolNames()
          
 String getDefaultProtocolName()
          
 int getExportedObjectPort(String protocolName)
          
 String getInitialContextFactoryName(String protocolName)
          
 URI getProviderURL(String protocolName)
          
 void setDefaultProtocol(String protocolName)
          Set the current protocol to the given parameter.
 
Methods inherited from class org.objectweb.jonas.service.AbsServiceImpl
getDomainName, getJonasServerName, getName, init, isStarted, setName, start, stop
 
Methods inherited from class org.objectweb.jonas.management.reconfig.emitter.ReconfigEmitter
initLogger, sendReconfigNotification, sendSaveNotification
 
Methods inherited from class javax.management.NotificationBroadcasterSupport
addNotificationListener, getNotificationInfo, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.objectweb.jonas.service.Service
getName, init, isStarted, setName, start, stop
 

Field Detail

MODE

public static final String MODE
Registry mode property name.

See Also:
Constant Field Values

CLASS

public static final String CLASS
Registry class property name.

See Also:
Constant Field Values

DEFAULT_MODE

public static final String DEFAULT_MODE
Automatic mode.

See Also:
Constant Field Values

COLLOCATED

public static final String COLLOCATED
Collocated mode.

See Also:
Constant Field Values

REMOTE

public static final String REMOTE
Remote mode.

See Also:
Constant Field Values
Constructor Detail

CarolRegistryService

public CarolRegistryService()
Method Detail

doInit

public void doInit(Context ctx)
Description copied from class: AbsServiceImpl
Abstract initialization method to be implemented by sub-classes

Specified by:
doInit in class AbsServiceImpl
Parameters:
ctx - configuration of the service

doStart

public void doStart()
             throws ServiceException
Description copied from class: AbsServiceImpl
Abstract start-up method to be implemented by sub-classes

Specified by:
doStart in class AbsServiceImpl
Throws:
ServiceException - service start-up failed

doStop

public void doStop()
            throws ServiceException
Description copied from class: AbsServiceImpl
Abstract method for service stopping to be implemented by sub-classes

Specified by:
doStop in class AbsServiceImpl
Throws:
ServiceException - service stopping failed

getActiveProtocolNames

public List getActiveProtocolNames()

Specified by:
getActiveProtocolNames in interface RegistryService
Returns:
Returns a List of currently active protocols names (rmi, irmi, iiop, ...).

getDefaultProtocolName

public String getDefaultProtocolName()

Specified by:
getDefaultProtocolName in interface RegistryService
Returns:
Returns the default protocol name.

getExportedObjectPort

public int getExportedObjectPort(String protocolName)

Specified by:
getExportedObjectPort in interface RegistryService
Parameters:
protocolName - protocol name
Returns:
Returns the given protocol port where objects are exported. Returns 0 if unset.

getInitialContextFactoryName

public String getInitialContextFactoryName(String protocolName)

Specified by:
getInitialContextFactoryName in interface RegistryService
Parameters:
protocolName - protocol name
Returns:
Returns the InitialContextFactory classname of the given protocol.

getProviderURL

public URI getProviderURL(String protocolName)

Specified by:
getProviderURL in interface RegistryService
Parameters:
protocolName - protocol name
Returns:
Returns the given protocol provider URL.

setDefaultProtocol

public void setDefaultProtocol(String protocolName)
Set the current protocol to the given parameter.

Specified by:
setDefaultProtocol in interface RegistryService
Parameters:
protocolName - the new default protocol name.


Copyright © 2007 OW2 Consortium. All Rights Reserved.