站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBOSS Portal 2.6 API 英文版文档

WebAppIntercepter - JBOSS Portal 2.6 API 英文版文档


org.jboss.portal.server.deployment
Class WebAppIntercepter

java.lang.Object
  extended byorg.jboss.mx.util.JBossNotificationBroadcasterSupport
      extended byorg.jboss.system.ServiceMBeanSupport
          extended byorg.jboss.portal.jems.as.system.AbstractJBossService
              extended byorg.jboss.portal.server.deployment.WebAppIntercepter
All Implemented Interfaces:
java.util.EventListener, javax.management.MBeanRegistration, javax.management.NotificationBroadcaster, javax.management.NotificationEmitter, javax.management.NotificationListener, org.jboss.system.Service, org.jboss.system.ServiceMBean
Direct Known Subclasses:
WebAppAdapter, WebAppEnhancer

public abstract class WebAppIntercepter
extends AbstractJBossService
implements javax.management.NotificationListener

Relay web deployments. When a web deployment occurs, it is abstracted into a PortalWebApp object that provides a consistent way to getPortalObjectContext informations and modify the web application.

When this service stops it does not send undeployment notifications, therefore it is up to the client of this service to perform any cleanup task associated to a deployment web application. The purpose of this is that most of the time clients of this service will be stopped before this one and they would receive undeployments in a not started state.

Version:
$Revision: 5448 $
Author:
Julien Viet

Field Summary
private  java.lang.ClassLoader classLoader
          The right classloader for fixing the issue with the fact that the classloader is not good on event notifications.
private  javax.management.ObjectName currentInterceptedDeployer
          A copy of the WARDeployer used for notification subscription removal.
private  java.util.Map deployments
          The current deployements.
private  PortalWebAppFactory factory
          The factory creating the portal web app objects.
private  javax.management.ObjectName interceptedDeployer
          WARDeployer.
 
Fields inherited from class org.jboss.system.ServiceMBeanSupport
log, server, SERVICE_CONTROLLER_SIG, serviceName
 
Fields inherited from class org.jboss.mx.util.JBossNotificationBroadcasterSupport
 
Fields inherited from interface org.jboss.system.ServiceMBean
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED
 
Constructor Summary
WebAppIntercepter()
           
 
Method Summary
protected abstract  void deploy(PortalWebApp pwa)
          Perform the deploy notification.
 java.util.Collection getDeployedURLs()
          Clone and return the deployed URLs.
 javax.management.ObjectName getInterceptedDeployer()
          Return the intercepted deployer.
 void handleNotification(javax.management.Notification notification, java.lang.Object handback)
          Only take care of start notifications.
 void setInterceptedDeployer(javax.management.ObjectName interceptedDeployer)
          Set the deployer on this service.
protected  void startService()
          Start listening to the deployer notifications.
protected  void stopService()
          Stop listening to the deployer notifications.
protected abstract  void undeploy(PortalWebApp pwa)
          Perform the undeploy notification.
 
Methods inherited from class org.jboss.portal.jems.as.system.AbstractJBossService
create, destroy, getState, getStateString, start, stop
 
Methods inherited from class org.jboss.system.ServiceMBeanSupport
createService, destroyService, getDeploymentInfo, getLog, getName, getNextNotificationSequenceNumber, getObjectName, getServer, getServiceName, jbossInternalCreate, jbossInternalDescription, jbossInternalDestroy, jbossInternalLifecycle, jbossInternalStart, jbossInternalStop, postDeregister, postRegister, preDeregister, preRegister
 
Methods inherited from class org.jboss.mx.util.JBossNotificationBroadcasterSupport
addNotificationListener, getNotificationInfo, handleNotification, nextNotificationSequenceNumber, removeNotificationListener, removeNotificationListener, sendNotification
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

interceptedDeployer

private javax.management.ObjectName interceptedDeployer
WARDeployer.


currentInterceptedDeployer

private javax.management.ObjectName currentInterceptedDeployer
A copy of the WARDeployer used for notification subscription removal.


deployments

private java.util.Map deployments
The current deployements.


factory

private PortalWebAppFactory factory
The factory creating the portal web app objects.


classLoader

private java.lang.ClassLoader classLoader
The right classloader for fixing the issue with the fact that the classloader is not good on event notifications.

Constructor Detail

WebAppIntercepter

public WebAppIntercepter()
Method Detail

setInterceptedDeployer

public void setInterceptedDeployer(javax.management.ObjectName interceptedDeployer)
Set the deployer on this service.


getInterceptedDeployer

public javax.management.ObjectName getInterceptedDeployer()
Return the intercepted deployer.


getDeployedURLs

public java.util.Collection getDeployedURLs()
Clone and return the deployed URLs.


handleNotification

public void handleNotification(javax.management.Notification notification,
                               java.lang.Object handback)
Only take care of start notifications.

Specified by:
handleNotification in interface javax.management.NotificationListener

startService

protected void startService()
                     throws java.lang.Exception
Start listening to the deployer notifications.

Throws:
java.lang.Exception

stopService

protected void stopService()
                    throws java.lang.Exception
Stop listening to the deployer notifications.

Throws:
java.lang.Exception

deploy

protected abstract void deploy(PortalWebApp pwa)
Perform the deploy notification.


undeploy

protected abstract void undeploy(PortalWebApp pwa)
Perform the undeploy notification.