Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
public interface Container
log()
method
signatures of the ServletContext
interface.
Field Summary | |
static String |
|
static String |
|
static String |
|
static String |
|
static String |
|
static String |
|
Method Summary | |
void | |
void |
|
void |
|
void |
|
Container |
|
Container[] |
|
ContainerListener[] |
|
int |
|
Cluster |
|
String |
|
Loader |
|
Logger |
|
Manager |
|
Object |
|
String |
|
Container |
|
ClassLoader |
|
Pipeline |
|
Realm |
|
DirContext |
|
void | |
void |
|
void |
|
void |
|
void |
|
void |
|
void | |
void | |
void |
|
void |
|
void | |
void |
|
void | |
void |
|
public static final String ADD_CHILD_EVENT
The ContainerEvent event type sent when a child container is added byaddChild()
.
public static final String ADD_MAPPER_EVENT
The ContainerEvent event type sent when a Mapper is added byaddMapper()
.
public static final String ADD_VALVE_EVENT
The ContainerEvent event type sent when a valve is added byaddValve()
, if this Container supports pipelines.
public static final String REMOVE_CHILD_EVENT
The ContainerEvent event type sent when a child container is removed byremoveChild()
.
public static final String REMOVE_MAPPER_EVENT
The ContainerEvent event type sent when a Mapper is removed byremoveMapper()
.
public static final String REMOVE_VALVE_EVENT
The ContainerEvent event type sent when a valve is removed byremoveValve()
, if this Container supports pipelines.
public void addChild(Container child)
Add a new child Container to those associated with this Container, if supported. Prior to adding this Container to the set of children, the child'ssetParent()
method must be called, with this Container as an argument. This method may thrown anIllegalArgumentException
if this Container chooses not to be attached to the specified Container, in which case it is not added
- Parameters:
child
- New child Container to be added
public void addContainerListener(ContainerListener listener)
Add a container event listener to this component.
- Parameters:
listener
- The listener to add
public void addPropertyChangeListener(PropertyChangeListener listener)
Add a property change listener to this component.
- Parameters:
listener
- The listener to add
public void backgroundProcess()
Execute a periodic task, such as reloading, etc. This method will be invoked inside the classloading context of this container. Unexpected throwables will be caught and logged.
public Container findChild(String name)
Return the child Container, associated with this Container, with the specified name (if any); otherwise, returnnull
- Parameters:
name
- Name of the child Container to be retrieved
public Container[] findChildren()
Return the set of children Containers associated with this Container. If this Container has no children, a zero-length array is returned.
public ContainerListener[] findContainerListeners()
Return the set of container listeners associated with this Container. If this Container has no registered container listeners, a zero-length array is returned.
public int getBackgroundProcessorDelay()
Get the delay between the invocation of the backgroundProcess method on this container and its children. Child containers will not be invoked if their delay value is not negative (which would mean they are using their own thread). Setting this to a positive value will cause a thread to be spawn. After waiting the specified amount of time, the thread will invoke the executePeriodic method on this container and all its children.
public Cluster getCluster()
Return the Cluster with which this Container is associated. If there is no associated Cluster, return the Cluster associated with our parent Container (if any); otherwise returnnull
.
public String getInfo()
Return descriptive information about this Container implementation and the corresponding version number, in the format<description>/<version>
.
public Loader getLoader()
Return the Loader with which this Container is associated. If there is no associated Loader, return the Loader associated with our parent Container (if any); otherwise, returnnull
.
public Logger getLogger()
Return the Logger with which this Container is associated. If there is no associated Logger, return the Logger associated with our parent Container (if any); otherwise returnnull
.
public Manager getManager()
Return the Manager with which this Container is associated. If there is no associated Manager, return the Manager associated with our parent Container (if any); otherwise returnnull
.
public Object getMappingObject()
Return an object which may be utilized for mapping to this component.
public String getName()
Return a name string (suitable for use by humans) that describes this Container. Within the set of child containers belonging to a particular parent, Container names must be unique.
public Container getParent()
Return the Container for which this Container is a child, if there is one. If there is no defined parent, returnnull
.
public ClassLoader getParentClassLoader()
Return the parent class loader (if any) for web applications.
public Pipeline getPipeline()
Return the Pipeline object that manages the Valves associated with this Container.
public Realm getRealm()
Return the Realm with which this Container is associated. If there is no associated Realm, return the Realm associated with our parent Container (if any); otherwise returnnull
.
public DirContext getResources()
Return the Resources with which this Container is associated. If there is no associated Resources object, return the Resources associated with our parent Container (if any); otherwise returnnull
.
public void invoke(Request request, Response response) throws IOException, ServletException
Process the specified Request, and generate the corresponding Response, according to the design of this particular Container.
- Parameters:
request
- Request to be processedresponse
- Response to be produced
public void removeChild(Container child)
Remove an existing child Container from association with this parent Container.
- Parameters:
child
- Existing child Container to be removed
public void removeContainerListener(ContainerListener listener)
Remove a container event listener from this component.
- Parameters:
listener
- The listener to remove
public void removePropertyChangeListener(PropertyChangeListener listener)
Remove a property change listener from this component.
- Parameters:
listener
- The listener to remove
public void setBackgroundProcessorDelay(int delay)
Set the delay between the invocation of the execute method on this container and its children.
- Parameters:
delay
- The delay in seconds between the invocation of backgroundProcess methods
public void setCluster(Cluster cluster)
Set the Cluster with which this Container is associated.
- Parameters:
cluster
- the Cluster with which this Container is associated.
public void setLoader(Loader loader)
Set the Loader with which this Container is associated.
- Parameters:
loader
- The newly associated loader
public void setLogger(Logger logger)
Set the Logger with which this Container is associated.
- Parameters:
logger
- The newly associated Logger
public void setManager(Manager manager)
Set the Manager with which this Container is associated.
- Parameters:
manager
- The newly associated Manager
public void setName(String name)
Set a name string (suitable for use by humans) that describes this Container. Within the set of child containers belonging to a particular parent, Container names must be unique.
- Parameters:
name
- New name of this container
public void setParent(Container container)
Set the parent Container to which this Container is being added as a child. This Container may refuse to become attached to the specified Container by throwing an exception.
- Parameters:
container
- Container to which this Container is being added as a child
public void setParentClassLoader(ClassLoader parent)
Set the parent class loader (if any) for web applications. This call is meaningful only before a Loader has been configured, and the specified value (if non-null) should be passed as an argument to the class loader constructor.
- Parameters:
parent
- The new parent class loader
public void setRealm(Realm realm)
Set the Realm with which this Container is associated.
- Parameters:
realm
- The newly associated Realm
public void setResources(DirContext resources)
Set the Resources object with which this Container is associated.
- Parameters:
resources
- The newly associated Resources