org.ow2.easybeans.api
Interface EZBServer

All Superinterfaces:
EZBJ2EEManagedObject

public interface EZBServer
extends EZBJ2EEManagedObject

Defines an EasyBeans server.

Author:
Florent Benoit

Field Summary
static String NAMING_EXTENSION_POINT
          This is the topic where naming events will be send.
 
Method Summary
 void addContainer(EZBContainer container)
          Add an already created container.
 EZBContainer createContainer(org.ow2.util.ee.deploy.api.deployable.IDeployable<?> deployable)
          Creates and adds an ejb3 container to the managed container.
 EZBContainer findContainer(org.ow2.util.archive.api.IArchive archive)
          Gets a container managed by this server.
<T extends EZBComponent>
T
getComponent(Class<T> itf)
          Get a reference to the first component matching the interface.
 EZBComponentManager getComponentManager()
           
 EZBContainer getContainer(String id)
          Gets a container managed by this server.
 Map<String,EZBContainer> getContainers()
           
 org.ow2.util.ee.deploy.api.deployer.IDeployerManager getDeployerManager()
           
 String getDescription()
          Gets a description of the embedded server.
 List<Class<? extends EasyBeansInterceptor>> getGlobalInterceptorsClasses()
          List of global interceptors classes to use.
 Integer getID()
          Gets the id of this embedded server.
 EZBServerJNDIResolver getJNDIResolver()
           
 EZBManagementPool getManagementThreadPool()
           
 EZBServerConfig getServerConfig()
           
 boolean isStarted()
           
 boolean isStopped()
           
 boolean isStopping()
           
 void removeContainer(EZBContainer container)
          Remove a given container.
 void setDeployerManager(org.ow2.util.ee.deploy.api.deployer.IDeployerManager deployerManager)
          Allows to set the deployer manager.
 void setManagementThreadPool(EZBManagementPool managementThreadPool)
          Defines the management thread pool.
 void stop()
          Stop the server.
 
Methods inherited from interface org.ow2.easybeans.api.EZBJ2EEManagedObject
getJ2EEManagedObjectId
 

Field Detail

NAMING_EXTENSION_POINT

static final String NAMING_EXTENSION_POINT
This is the topic where naming events will be send. Interested IEventListeners should register to this topic.

See Also:
Constant Field Values
Method Detail

getID

Integer getID()
Gets the id of this embedded server.

Returns:
the id of this server.

getDescription

String getDescription()
Gets a description of the embedded server.

Returns:
a description of the embedded server

createContainer

EZBContainer createContainer(org.ow2.util.ee.deploy.api.deployable.IDeployable<?> deployable)
Creates and adds an ejb3 container to the managed container.

Parameters:
deployable - the container deployable.
Returns:
the created container.

addContainer

void addContainer(EZBContainer container)
Add an already created container.

Parameters:
container - the EZBContainer to be added.

getContainer

EZBContainer getContainer(String id)
Gets a container managed by this server.

Parameters:
id - the container id.
Returns:
the container if it is found, else null.

findContainer

EZBContainer findContainer(org.ow2.util.archive.api.IArchive archive)
Gets a container managed by this server.

Parameters:
archive - the archive used by the given container.
Returns:
the container if it is found, else null.

removeContainer

void removeContainer(EZBContainer container)
Remove a given container.

Parameters:
container - the container to be removed.

getContainers

Map<String,EZBContainer> getContainers()
Returns:
Returns the deployed containers.

getComponentManager

EZBComponentManager getComponentManager()
Returns:
the ComponentManager used by this instance.

getJNDIResolver

EZBServerJNDIResolver getJNDIResolver()
Returns:
the JNDI Resolver of this server.

getDeployerManager

org.ow2.util.ee.deploy.api.deployer.IDeployerManager getDeployerManager()
Returns:
the Deployer manager.

setDeployerManager

void setDeployerManager(org.ow2.util.ee.deploy.api.deployer.IDeployerManager deployerManager)
Allows to set the deployer manager.

Parameters:
deployerManager - the Deployer manager.

getManagementThreadPool

EZBManagementPool getManagementThreadPool()
Returns:
the management pool used to managed the pools (creating instance, etc.)

setManagementThreadPool

void setManagementThreadPool(EZBManagementPool managementThreadPool)
Defines the management thread pool.

Parameters:
managementThreadPool - the management pool used to managed the pools (creating instance, etc.)

stop

void stop()
          throws EZBServerException
Stop the server.

Throws:
EZBServerException - if there is a failure.

isStopped

boolean isStopped()
Returns:
true if EasyBeans has been stopped.

isStopping

boolean isStopping()
Returns:
true if EasyBeans is being stopped.

isStarted

boolean isStarted()
Returns:
true if EasyBeans has been started.

getServerConfig

EZBServerConfig getServerConfig()
Returns:
the server config

getGlobalInterceptorsClasses

List<Class<? extends EasyBeansInterceptor>> getGlobalInterceptorsClasses()
List of global interceptors classes to use.

Returns:
list of classes

getComponent

<T extends EZBComponent> T getComponent(Class<T> itf)
Get a reference to the first component matching the interface.

Specified by:
getComponent in interface EZBJ2EEManagedObject
Type Parameters:
T - The interface type.
Parameters:
itf - The interface class.
Returns:
The component.


Copyright © 2006-2012 OW2 Consortium. All Rights Reserved.