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

LifeCycleAdapter - JBOSS Portal 2.6 API 英文版文档


org.jboss.portal.jems.as.system
Class LifeCycleAdapter

java.lang.Object
  extended byorg.jboss.portal.jems.as.system.LifeCycleAdapter

public class LifeCycleAdapter
extends java.lang.Object

Adapts JBoss lifecycle event handling and multiplex event from different sources into one source.

It requires an MBeanServer and a ServiceController plugged into the MBeanServer.

Version:
$Revision: 5448 $
Author:
Julien Viet

Nested Class Summary
private  class LifeCycleAdapter.Listener
           
 
Field Summary
protected  org.jboss.system.ServiceControllerMBean controller
          The service controller name.
private  LifeCycleAdapter.Listener listener
          The delegated listener.
protected  org.apache.log4j.Logger log
          The logger.
private static javax.management.ObjectName MBEAN_SERVER_DELEGATE
          The name of the server delegate.
protected  javax.management.MBeanServer server
          The server.
private  java.util.Set watched
          The watched mbeans.
 
Constructor Summary
LifeCycleAdapter(javax.management.MBeanServer server)
          Create the rule for the given server.
 
Method Summary
 void addStateListener(javax.management.ObjectName name)
           
protected  void created(javax.management.ObjectName name)
           
protected  void destroyed(javax.management.ObjectName name)
           
 void removeStateListener(javax.management.ObjectName name)
           
 void start()
          Start the adapter.
protected  void started(javax.management.ObjectName name)
           
protected  void starting(javax.management.ObjectName name)
           
 void stop()
          Stop the adapter
protected  void stopped(javax.management.ObjectName name)
           
protected  void stopping(javax.management.ObjectName name)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MBEAN_SERVER_DELEGATE

private static final javax.management.ObjectName MBEAN_SERVER_DELEGATE
The name of the server delegate.


log

protected org.apache.log4j.Logger log
The logger.


controller

protected org.jboss.system.ServiceControllerMBean controller
The service controller name.


server

protected javax.management.MBeanServer server
The server.


listener

private LifeCycleAdapter.Listener listener
The delegated listener.


watched

private java.util.Set watched
The watched mbeans.

Constructor Detail

LifeCycleAdapter

public LifeCycleAdapter(javax.management.MBeanServer server)
Create the rule for the given server.

Method Detail

start

public void start()
           throws java.lang.IllegalStateException
Start the adapter.

Throws:
java.lang.IllegalStateException - if the service controller is missing

stop

public void stop()
Stop the adapter


addStateListener

public void addStateListener(javax.management.ObjectName name)

removeStateListener

public void removeStateListener(javax.management.ObjectName name)

created

protected void created(javax.management.ObjectName name)

starting

protected void starting(javax.management.ObjectName name)

started

protected void started(javax.management.ObjectName name)

stopping

protected void stopping(javax.management.ObjectName name)

stopped

protected void stopped(javax.management.ObjectName name)

destroyed

protected void destroyed(javax.management.ObjectName name)