org.ow2.jonas.web.jetty6
Class Jetty6Service

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.web.AbsJWebContainerServiceImpl
                  extended by org.ow2.jonas.web.jetty6.Jetty6Service
All Implemented Interfaces:
NotificationBroadcaster, NotificationEmitter, Service, AbsJWebContainerServiceImplMBean, JWebContainerService

public class Jetty6Service
extends AbsJWebContainerServiceImpl
implements JWebContainerService

This class provides an implementation of the Jetty service (as web container service).

Author:
Florent Benoit

Nested Class Summary
 
Nested classes/interfaces inherited from class org.objectweb.jonas.web.AbsJWebContainerServiceImpl
AbsJWebContainerServiceImpl.WebLoaderHolder
 
Field Summary
 
Fields inherited from class org.objectweb.jonas.web.AbsJWebContainerServiceImpl
AUTOLOADDIR, CLASS, DESCRIPTORS, INEAR_WORK_WEBAPPS_DIR_SUFFIX, jmx, JONAS_BASE, PARSINGWITHVALIDATION, SINGLE_WORK_WEBAPPS_DIR_SUFFIX, WEBAPPS_DIR, WORK_DIR, WORK_WEBAPPS_DIR
 
Fields inherited from class org.objectweb.jonas.management.reconfig.emitter.ReconfigEmitter
RECONFIG_TYPE, SAVE_RECONFIG_TYPE
 
Constructor Summary
Jetty6Service()
           
 
Method Summary
protected  void doInit(Context ctx)
          Initialize the Jetty service.
protected  void doRegisterWar(Context ctx)
          Create the environment and delegate the operation to the implementation of the web container.
 void doStart()
          Start the Jetty service in a new thread.
protected  void doStop()
          Stop the Jetty service.
protected  void doUnRegisterWar(Context ctx)
          Delegate the unregistration to the implementation of the web container.
 String getDefaultHost()
          Return the Default host name of the web container.
 String getDefaultHttpPort()
          Return the Default HTTP port number of the web container (can be null if multiple HTTP connector has been set).
 String getDefaultHttpsPort()
          Return the Default HTTPS port number of the web container (can be null if multiple HTTPS connector has been set).
 String getJOnASClassPath(ClassLoader webClassLoader)
          Return the classpath which can be used for jsp compiling by Jasper.
protected  void updateServerInfos()
          Update info of the serverName and serverVersion.
 
Methods inherited from class org.objectweb.jonas.web.AbsJWebContainerServiceImpl
deployWars, getAutoloadDirectories, getClassLoader, getContextFactory, getContextLinkedClassLoader, getCurrentNumberOfWars, getDeployableWars, getDeployedWars, getInstalledWars, getLogger, getNaming, getServerName, getServerVersion, getUnpackDir, getWar, getWarNames, getWarsDirectory, isWarLoaded, registerWar, removeCache, setServerName, setServerVersion, unDeployWars, unRegisterWar
 
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.web.JWebContainerService
deployWars, getClassLoader, getContextLinkedClassLoader, isWarLoaded, registerWar, removeCache, unDeployWars, unRegisterWar
 
Methods inherited from interface org.objectweb.jonas.service.Service
getName, init, isStarted, setName, start, stop
 

Constructor Detail

Jetty6Service

public Jetty6Service()
Method Detail

doInit

protected void doInit(Context ctx)
               throws ServiceException
Initialize the Jetty service.

Overrides:
doInit in class AbsJWebContainerServiceImpl
Parameters:
ctx - the configuration context of the service.
Throws:
ServiceException - if the initialization failed.

doStart

public void doStart()
             throws ServiceException
Start the Jetty service in a new thread.

Overrides:
doStart in class AbsJWebContainerServiceImpl
Throws:
ServiceException - if the startup failed.

doStop

protected void doStop()
               throws ServiceException
Stop the Jetty service.

Overrides:
doStop in class AbsJWebContainerServiceImpl
Throws:
ServiceException - if the stop failed.

doRegisterWar

protected void doRegisterWar(Context ctx)
                      throws JWebContainerServiceException
Create the environment and delegate the operation to the implementation of the web container.

Specified by:
doRegisterWar in class AbsJWebContainerServiceImpl
Parameters:
ctx - the context which contains the configuration in order to deploy a WAR.
Throws:
JWebContainerServiceException - if the registration of the WAR failed.

getJOnASClassPath

public String getJOnASClassPath(ClassLoader webClassLoader)
Return the classpath which can be used for jsp compiling by Jasper. This classpath is extracted from the web classloader.

Parameters:
webClassLoader - the ClassLoader used for extract URLs.
Returns:
the jonas classpath which is useful for JSP compiling.

doUnRegisterWar

protected void doUnRegisterWar(Context ctx)
                        throws JWebContainerServiceException
Delegate the unregistration to the implementation of the web container.

Specified by:
doUnRegisterWar in class AbsJWebContainerServiceImpl
Parameters:
ctx - the context which contains the configuration in order to undeploy a WAR.
Throws:
JWebContainerServiceException - if the unregistration failed.

updateServerInfos

protected void updateServerInfos()
Update info of the serverName and serverVersion.

Specified by:
updateServerInfos in class AbsJWebContainerServiceImpl

getDefaultHost

public String getDefaultHost()
                      throws JWebContainerServiceException
Return the Default host name of the web container.

Specified by:
getDefaultHost in interface JWebContainerService
Specified by:
getDefaultHost in class AbsJWebContainerServiceImpl
Returns:
the Default host name of the web container.
Throws:
JWebContainerServiceException - when default host cannot be resolved (multiple services).

getDefaultHttpPort

public String getDefaultHttpPort()
                          throws JWebContainerServiceException
Return the Default HTTP port number of the web container (can be null if multiple HTTP connector has been set).

Specified by:
getDefaultHttpPort in interface JWebContainerService
Specified by:
getDefaultHttpPort in class AbsJWebContainerServiceImpl
Returns:
the Default HTTP port number of the web container.
Throws:
JWebContainerServiceException - when default HTTP port cannot be resolved (multiple occurences).

getDefaultHttpsPort

public String getDefaultHttpsPort()
                           throws JWebContainerServiceException
Return the Default HTTPS port number of the web container (can be null if multiple HTTPS connector has been set).

Specified by:
getDefaultHttpsPort in interface JWebContainerService
Specified by:
getDefaultHttpsPort in class AbsJWebContainerServiceImpl
Returns:
the Default HTTPS port number of the web container.
Throws:
JWebContainerServiceException - when default HTTPS port cannot be resolved (multiple occurences).


Copyright © 2007 OW2 Consortium. All Rights Reserved.