|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.norther.tammi.core.base.Adaptee
org.norther.tammi.core.thread.AbstractExecutor
public abstract class AbstractExecutor
An abstract implementation of Executor.
| Field Summary |
|---|
| Fields inherited from class org.norther.tammi.core.base.Adaptee |
|---|
ADAPTEE_NOTIF_DESCRIPTION, ADAPTEE_NOTIFICATIONS |
| Fields inherited from interface org.norther.tammi.core.base.MBeanDelegate |
|---|
ARRAY_TYPE, OBJECT_TYPE, PRIMITIVE_TYPE, STRING_TYPE |
| Constructor Summary | |
|---|---|
AbstractExecutor()
Constructs a new executor. |
|
| Method Summary | |
|---|---|
boolean |
awaitTermination(long timeout,
TimeUnit unit)
|
void |
execute(Runnable task)
|
int |
getActiveCount()
|
long |
getCompletedTaskCount()
|
protected ExecutorService |
getExecutor()
Gets the implementation of the executor. |
long |
getTaskCount()
|
List |
invokeAll(Collection tasks)
|
List |
invokeAll(Collection tasks,
long timeout,
TimeUnit unit)
|
Object |
invokeAny(Collection tasks)
|
Object |
invokeAny(Collection tasks,
long timeout,
TimeUnit unit)
|
boolean |
isShutdown()
|
boolean |
isStarted()
Checks whether the startable has been started. |
boolean |
isTerminated()
|
protected abstract ExecutorService |
newExecutor()
Creates the implementation of the executor. |
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 |
shutdown()
|
List |
shutdownNow()
|
void |
start()
Starts the MBean. |
void |
stop()
Stops the MBean. |
Future |
submit(Callable task)
|
Future |
submit(Runnable task)
|
Future |
submit(Runnable task,
Object result)
|
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 AbstractExecutor()
| Method Detail |
|---|
public void postmanaged()
Manageable
postmanaged in interface Manageablepostmanaged in class Adaptee
public void unmanaged()
throws Exception
Manageable
unmanaged in interface Manageableunmanaged in class AdapteeException - if the adaptee refused to be unmanaged.public boolean isStarted()
Startable
isStarted in interface Startable
public void start()
throws Exception
Startable
start in interface StartableException - if start fails.public void stop()
Startable
stop in interface Startable
public boolean awaitTermination(long timeout,
TimeUnit unit)
throws InterruptedException
awaitTermination in interface ExecutorServiceInterruptedExceptionpublic boolean isShutdown()
isShutdown in interface ExecutorServicepublic boolean isTerminated()
isTerminated in interface ExecutorServicepublic void shutdown()
shutdown in interface ExecutorServicepublic List shutdownNow()
shutdownNow in interface ExecutorService
public List invokeAll(Collection tasks,
long timeout,
TimeUnit unit)
throws InterruptedException
invokeAll in interface ExecutorServiceInterruptedException
public List invokeAll(Collection tasks)
throws InterruptedException
invokeAll in interface ExecutorServiceInterruptedException
public Object invokeAny(Collection tasks,
long timeout,
TimeUnit unit)
throws InterruptedException,
ExecutionException,
TimeoutException
invokeAny in interface ExecutorServiceInterruptedException
ExecutionException
TimeoutException
public Object invokeAny(Collection tasks)
throws InterruptedException,
ExecutionException
invokeAny in interface ExecutorServiceInterruptedException
ExecutionExceptionpublic Future submit(Callable task)
submit in interface ExecutorService
public Future submit(Runnable task,
Object result)
submit in interface ExecutorServicepublic Future submit(Runnable task)
submit in interface ExecutorServicepublic void execute(Runnable task)
execute in interface Executorpublic long getCompletedTaskCount()
public int getActiveCount()
public long getTaskCount()
protected ExecutorService getExecutor()
protected abstract ExecutorService newExecutor()
NullPointerException - for missing resources.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||