org.ow2.jonas.smartclient.internal
Class SmartclientServiceImpl

java.lang.Object
  extended by javax.management.NotificationBroadcasterSupport
      extended by org.ow2.jonas.lib.reconfig.ReconfigEmitter
          extended by org.ow2.jonas.lib.service.AbsServiceImpl
              extended by org.ow2.jonas.smartclient.internal.SmartclientServiceImpl
All Implemented Interfaces:
NotificationBroadcaster, NotificationEmitter, Service, SmartclientServiceImplMBean, SmartclientService, SmartclientServiceBase

public class SmartclientServiceImpl
extends AbsServiceImpl
implements SmartclientService, SmartclientServiceImplMBean

Implements the smartclient service.

Author:
S. Ali Tokmen
See Also:
SmartclientService

Field Summary
 
Fields inherited from class org.ow2.jonas.lib.reconfig.ReconfigEmitter
RECONFIG_TYPE, SAVE_RECONFIG_TYPE
 
Constructor Summary
SmartclientServiceImpl()
           
 
Method Summary
protected  void doStart()
          Starts the EasyBeans smartclient service and registers the management bean with JMX.
protected  void doStop()
          Stops the EasyBeans smartclient service and unregisters the management bean from JMX.
static ObjectName getObjectName(String domainName)
           
 int getPort()
          , returns -1 if the EasyBeans Smartclient has not been started yet.
 boolean isActive()
          
 void setJmxService(JmxService jmxService)
           
 void setPort(int port)
           
 
Methods inherited from class org.ow2.jonas.lib.service.AbsServiceImpl
convertToList, doInit, getDomainName, getJonasServerName, getName, getServerProperties, init, isStarted, setName, setServerProperties, start, stop, throwRequirementException, toString
 
Methods inherited from class org.ow2.jonas.lib.reconfig.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, wait, wait, wait
 
Methods inherited from interface org.ow2.jonas.service.Service
getName, init, isStarted, setName, start, stop
 

Constructor Detail

SmartclientServiceImpl

public SmartclientServiceImpl()
Method Detail

setJmxService

public void setJmxService(JmxService jmxService)
Parameters:
jmxService - JMX service to set.

setPort

public void setPort(int port)
Parameters:
port - Port number to set.

getObjectName

public static ObjectName getObjectName(String domainName)
Parameters:
domainName - Server's domain name.
Returns:
JMX name of the smartclient service management bean.

doStart

protected void doStart()
                throws ServiceException
Starts the EasyBeans smartclient service and registers the management bean with JMX.

Specified by:
doStart in class AbsServiceImpl
Throws:
ServiceException - If starting the EasyBeans Smartclient fails.

doStop

protected void doStop()
               throws ServiceException
Stops the EasyBeans smartclient service and unregisters the management bean from JMX.

Specified by:
doStop in class AbsServiceImpl
Throws:
ServiceException - If stopping the EasyBeans Smartclient fails.

getPort

public int getPort()
, returns -1 if the EasyBeans Smartclient has not been started yet.

Specified by:
getPort in interface SmartclientServiceBase
Returns:
The port the smart client is listening on.

isActive

public boolean isActive()

Specified by:
isActive in interface SmartclientServiceBase
Returns:
true if the EasyBeans Smartclient is active, false otherwise.


Copyright © 2010 OW2 Consortium. All Rights Reserved.