|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.norther.tammi.core.base.Adaptee org.norther.tammi.core.thread.DefaultExecutable
public class DefaultExecutable
A default implementation of Executable.
Field Summary |
---|
Fields inherited from class org.norther.tammi.core.base.Adaptee |
---|
ADAPTEE_NOTIF_DESCRIPTION, ADAPTEE_NOTIFICATIONS |
Constructor Summary | |
---|---|
DefaultExecutable()
Constructs a new executable. |
|
DefaultExecutable(boolean multiple)
Constructs a new executable for multiple threads. |
|
DefaultExecutable(Runnable adaptee)
Constructs a new executable adapter. |
|
DefaultExecutable(Runnable adaptee,
boolean multiple)
Constructs a new executable adapter for multiple threads. |
Method Summary | |
---|---|
protected Executor |
getExecutor()
Gets the referent of the executor MBean. |
ObjectName |
getExecutorName()
Gets the the executor of this executable. |
boolean |
isStarted()
Checks whether the startable has been started. |
void |
postmanaged()
This method is called when the implementing adaptee has been managed either during post-registration of the corresponding adapter MBean or just after it is explicitly added to the adapter MBean during run-time. |
void |
run()
|
void |
setExecutorName(ObjectName executor)
Sets the executor of this executable. |
void |
start()
Starts the MBean. |
void |
stop()
Stops the MBean. |
void |
unmanaged()
This method is called when the implementing adaptee is unmanaged either during pre-deregistration of the corresponding adapter MBean or just before it is explicitly removed from the adapter MBean during run-time. |
Methods inherited from class org.norther.tammi.core.base.Adaptee |
---|
addAdaptee, addNotificationListener, getAttributeSupport, getBroker, getCanonicalName, getDomain, getFactory, getLoader, getLog, getLog, getMBean, getMBeanServer, getNotificationInfo, getObjectName, getRegistrationTime, getSequenceNumber, hasListeners, isRegistered, premanaged, removeNotificationListener, removeNotificationListener, sendNotification, sendNotification, sendNotification, sendNotification, unregister |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultExecutable()
public DefaultExecutable(boolean multiple)
multiple
- true to allow more than one threads.public DefaultExecutable(Runnable adaptee)
adaptee
- the adaptee.public DefaultExecutable(Runnable adaptee, boolean multiple)
adaptee
- the adaptee.multiple
- true to allow more than one threads.Method Detail |
---|
public void postmanaged()
Manageable
postmanaged
in interface Manageable
postmanaged
in class Adaptee
public void unmanaged() throws Exception
Manageable
unmanaged
in interface Manageable
unmanaged
in class Adaptee
Exception
- if the adaptee refused to be unmanaged.public ObjectName getExecutorName()
Executable
getExecutorName
in interface Executable
public void setExecutorName(ObjectName executor)
Executable
Note that it will be taken into use after next start.
setExecutorName
in interface Executable
executor
- the object name of the executor or a query.public boolean isStarted()
Startable
isStarted
in interface Startable
public void start() throws Exception
Startable
start
in interface Startable
Exception
- if start fails.public void stop()
Startable
stop
in interface Startable
public void run()
run
in interface Runnable
protected Executor getExecutor()
IllegalStateException
- if not available.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |