|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.jetty.util.component.AbstractLifeCycle org.eclipse.jetty.util.component.AggregateLifeCycle
public class AggregateLifeCycle
An AggregateLifeCycle is an AbstractLifeCycle with a collection of dependent beans.
Dependent beans are started and stopped with the LifeCycle
and if they are destroyed if they are also Destroyable
.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle |
---|
AbstractLifeCycle.AbstractLifeCycleListener |
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle |
---|
LifeCycle.Listener |
Field Summary |
---|
Fields inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle |
---|
_listeners, FAILED, RUNNING, STARTED, STARTING, STOPPED, STOPPING |
Constructor Summary | |
---|---|
AggregateLifeCycle()
|
Method Summary | ||
---|---|---|
boolean |
addBean(Object o)
Add an associated bean. |
|
void |
destroy()
|
|
protected void |
doStart()
|
|
protected void |
doStop()
|
|
String |
dump()
|
|
void |
dump(Appendable out)
|
|
void |
dump(Appendable out,
String indent)
|
|
static void |
dump(Appendable out,
String indent,
Collection<?>... collections)
|
|
static String |
dump(Dumpable dumpable)
|
|
void |
dumpStdErr()
|
|
protected void |
dumpThis(Appendable out)
|
|
|
getBean(Class<T> clazz)
Get dependent bean of a specific class. |
|
Collection<Object> |
getBeans()
Get dependent beans |
|
|
getBeans(Class<T> clazz)
Get dependent beans of a specific class |
|
boolean |
removeBean(Object o)
Remove an associated bean. |
|
void |
removeBeans()
Remove all associated bean. |
Methods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle |
---|
addLifeCycleListener, getState, getState, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AggregateLifeCycle()
Method Detail |
---|
public void destroy()
destroy
in interface Destroyable
protected void doStart() throws Exception
doStart
in class AbstractLifeCycle
Exception
protected void doStop() throws Exception
doStop
in class AbstractLifeCycle
Exception
public boolean addBean(Object o)
LifeCycle
instance, it will be
started/stopped. Any beans that are also
Destroyable
, will be destroyed with the server.
o
- the bean object to addpublic Collection<Object> getBeans()
public <T> List<T> getBeans(Class<T> clazz)
clazz
-
addBean(Object)
public <T> T getBean(Class<T> clazz)
clazz
-
addBean(Object)
public void removeBeans()
public boolean removeBean(Object o)
public void dumpStdErr()
public String dump()
dump
in interface Dumpable
public static String dump(Dumpable dumpable)
public void dump(Appendable out) throws IOException
IOException
protected void dumpThis(Appendable out) throws IOException
IOException
public void dump(Appendable out, String indent) throws IOException
dump
in interface Dumpable
IOException
public static void dump(Appendable out, String indent, Collection<?>... collections) throws IOException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |