org.apache.geronimo.core.service
Interface Component

All Known Subinterfaces:
Container, RPCContainer
All Known Implementing Classes:
SimpleComponent, SimpleContainer, SimpleRPCContainer

public interface Component

Implements the JSR 77 state model

Version:
$Rev: 355877 $ $Date: 2005-12-11 03:48:27 +0100 (Sun, 11 Dec 2005) $

Method Summary
 Container getContainer()
          Gets the container to which this component belongs.
 void setContainer(Container container)
          Sets the container which ownes this component.
 

Method Detail

getContainer

public Container getContainer()
Gets the container to which this component belongs.

Returns:
the container for which invocations will be intercepted

setContainer

public void setContainer(Container container)
                  throws IllegalStateException,
                         IllegalArgumentException
Sets the container which ownes this component. The contianer can only be set before create() or to null after the destroy().

Parameters:
container - which owns this component
Throws:
IllegalStateException - if this component is not in the not-created or destroyed state
IllegalArgumentException - if this comonent has not been created and the container parameter is null, or the component has been destroyed and the container parameter is NOT null


Copyright © 2003-2007 Apache Software Foundation. All Rights Reserved.