org.openejb.assembler
Class ContainerBuilder

java.lang.Object
  extended byorg.openejb.assembler.ContainerBuilder
All Implemented Interfaces:
Container, RpcContainer

public class ContainerBuilder
extends Object
implements RpcContainer


Field Summary
 
Fields inherited from interface org.openejb.assembler.Container
ENTITY, MESSAGE_DRIVEN, STATEFUL, STATELESS
 
Constructor Summary
ContainerBuilder()
           
 
Method Summary
 void deploy(Object deploymentID, DeploymentInfo info)
          Adds a bean to this container.
 DeploymentInfo[] deployments()
          Gets the DeploymentInfo objects for all the beans deployed in this container.
 Object getContainerID()
          Gets the id of this container.
 int getContainerType()
          Gets the type of container (STATELESS, STATEFUL, ENTITY, or MESSAGE_DRIVEN
 DeploymentInfo getDeploymentInfo(Object deploymentID)
          Gets the DeploymentInfo object for the bean with the specified deployment id.
 void init(Object containerId, HashMap deploymentsMap, Properties properties)
          This method is used to initalized a new container with its name, deployments and properties.
 Object invoke(Object deployID, Method callMethod, Object[] args, Object primKey, Object securityIdentity)
          Invokes a method on an instance of the specified bean deployment.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContainerBuilder

public ContainerBuilder()
Method Detail

init

public void init(Object containerId,
                 HashMap deploymentsMap,
                 Properties properties)
          throws OpenEJBException
Description copied from interface: Container
This method is used to initalized a new container with its name, deployments and properties. this method is invoked by the assembler and will throw an exception if invoked after the container is assembled.

Specified by:
init in interface Container
Throws:
OpenEJBException

invoke

public Object invoke(Object deployID,
                     Method callMethod,
                     Object[] args,
                     Object primKey,
                     Object securityIdentity)
              throws OpenEJBException
Description copied from interface: RpcContainer
Invokes a method on an instance of the specified bean deployment.

Specified by:
invoke in interface RpcContainer
Parameters:
deployID - the dployment id of the bean deployment
callMethod - the method to be called on the bean instance
args - the arguments to use when invoking the specified method
primKey - the primary key class of the bean or null if the bean does not need a primary key
Returns:
the result of invoking the specified method on the bean instance
Throws:
OpenEJBException
See Also:
StatefulContainer.invoke, StatelessContainer.invoke

getContainerType

public int getContainerType()
Description copied from interface: Container
Gets the type of container (STATELESS, STATEFUL, ENTITY, or MESSAGE_DRIVEN

Specified by:
getContainerType in interface Container
Returns:
id type bean container

getDeploymentInfo

public DeploymentInfo getDeploymentInfo(Object deploymentID)
Description copied from interface: Container
Gets the DeploymentInfo object for the bean with the specified deployment id.

Specified by:
getDeploymentInfo in interface Container
Returns:
the DeploymentInfo object associated with the bean.
See Also:
DeploymentInfo, ContainerSystem.getDeploymentInfo, DeploymentInfo.getDeploymentID()

deployments

public DeploymentInfo[] deployments()
Description copied from interface: Container
Gets the DeploymentInfo objects for all the beans deployed in this container.

Specified by:
deployments in interface Container
Returns:
an array of DeploymentInfo objects
See Also:
DeploymentInfo, ContainerSystem.deployments()

deploy

public void deploy(Object deploymentID,
                   DeploymentInfo info)
            throws OpenEJBException
Description copied from interface: Container
Adds a bean to this container.

Specified by:
deploy in interface Container
Parameters:
info - the DeploymentInfo object associated with the bean.
Throws:
OpenEJBException - Occurs when the container is not able to deploy the bean for some reason.

getContainerID

public Object getContainerID()
Description copied from interface: Container
Gets the id of this container.

Specified by:
getContainerID in interface Container
Returns:
the id of this container.
See Also:
DeploymentInfo.getContainerID()


Copyright © 1999-2005 OpenEJB. All Rights Reserved.