|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.easybeans.server.Embedded
public class Embedded
Allows to create an embedded EJB3 server.
Field Summary | |
---|---|
private ComponentManager |
componentManager
Manager of components. |
private Components |
components
List of components that have been defined. |
private java.util.Map<java.lang.String,EZBContainer> |
containers
Map of managed ejb3 containers. |
private static int |
counter
Internal (global) counter of all embedded instance created. |
private Deployer |
deployer
Deployer instance. |
private java.util.List<EasyBeansConfigurationExtension> |
extensionFactories
List of Callbacks factories. |
private java.lang.Integer |
id
ID of this embedded server. |
private static JLog |
logger
Logger. |
private ContainersMonitor |
monitor
Monitor of the containers. |
private ServerConfig |
serverConfig
Configuration of this server. |
private static int |
SLEEP_VALUE
Default sleep value (for server loop). |
private boolean |
started
Server started ? |
Constructor Summary | |
---|---|
Embedded()
Creates a new Embedded server. It will take default values of configuration. |
Method Summary | |
---|---|
void |
addContainer(EZBContainer container)
Add an already created container. |
private void |
callJContainerConfigExtensions(EZBContainerConfig jcc)
Adapt the JContainerConfig for all EasyBeansConfigurationExtension . |
private void |
configure()
Configure the server by using the given configuration. |
EZBContainer |
createContainer(EZBArchive archive)
Creates and adds an ejb3 container to the managed container. |
EZBComponent |
getComponent(java.lang.String componentName)
Gets component with the given name. |
ComponentManager |
getComponentManager()
|
Components |
getComponents()
Gets the components that have been defined for this embedded server. |
EZBContainer |
getContainer(java.lang.String id)
Gets a container managed by this server. |
java.util.Map<java.lang.String,EZBContainer> |
getContainers()
|
Deployer |
getDeployer()
|
java.lang.Integer |
getID()
Gets the id of this embedded server. |
ServerConfig |
getServerConfig()
|
void |
removeContainer(EZBContainer container)
Remove a given container. |
void |
setComponents(Components components)
Sets the components that needs to be launched. |
void |
setServerConfig(ServerConfig serverConfig)
Sets the server configuration (not the components). |
void |
start()
Starts the EJB3 server. |
void |
stop()
Stops the EJB3 server. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final int SLEEP_VALUE
private static JLog logger
private static int counter
private java.lang.Integer id
private ServerConfig serverConfig
private java.util.Map<java.lang.String,EZBContainer> containers
private java.util.List<EasyBeansConfigurationExtension> extensionFactories
private Deployer deployer
private Components components
private ComponentManager componentManager
private boolean started
private ContainersMonitor monitor
Constructor Detail |
---|
public Embedded()
Method Detail |
---|
public void start() throws EmbeddedException
EmbeddedException
- if there is a failure while starting the
server.public void stop() throws EmbeddedException
EmbeddedException
- if container cannot be stopped.public void setServerConfig(ServerConfig serverConfig)
serverConfig
- the given configurationpublic EZBContainer getContainer(java.lang.String id)
getContainer
in interface EZBServer
id
- the container id.
private void configure()
public EZBContainer createContainer(EZBArchive archive)
archive
- jar file or exploded archive.
public void addContainer(EZBContainer container)
container
- the EZBContainer to be added.public void removeContainer(EZBContainer container)
container
- the container to be removed.private void callJContainerConfigExtensions(EZBContainerConfig jcc)
EasyBeansConfigurationExtension
.
jcc
- the JContainerConfig to adapt.public ServerConfig getServerConfig()
public java.util.Map<java.lang.String,EZBContainer> getContainers()
getContainers
in interface EZBServer
public java.lang.Integer getID()
getID
in interface EZBServer
public Deployer getDeployer()
public Components getComponents()
public void setComponents(Components components)
components
- the set of components.public EZBComponent getComponent(java.lang.String componentName)
componentName
- the name of the component.
public ComponentManager getComponentManager()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |