|
||||||||||
| 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.DefaultScheduler
org.norther.tammi.core.thread.DefaultTimeout
public class DefaultTimeout
A default implementation of Timeout.
| 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 | |
|---|---|
DefaultTimeout()
Constructs a new scheduler. |
|
| Method Summary | |
|---|---|
Future |
close(Closeable target,
long timeout,
boolean interrupt)
Closes the given closeable after a timeout. |
Future |
close(ServerSocket socket,
long timeout,
boolean interrupt)
Closes the given server socket after a timeout. |
Future |
close(Socket socket,
long timeout,
boolean interrupt)
Closes the given socket after a timeout. |
Future |
execute(Callable command,
long timeout)
Executes the given callable command after a timeout. |
Future |
execute(Runnable command,
long timeout)
Executes the given command after a timeout. |
boolean |
isLoggingEnabled()
Checks whether timeout logging of this scheduler is enabled. |
void |
setLoggingEnabled(boolean flag)
Sets whether timoeut logging of this scheduler is enabled. |
| Methods inherited from class org.norther.tammi.core.thread.DefaultScheduler |
|---|
executeAfterDelay, executeAfterDelay, executeAt, executeAt, executePeriodically, executePeriodically, executePeriodically, getExecutor, getExecutorName, getIdleCommand, getIdleDelay, getThreadFactoryName, getTimer, handleNotification, isIdleSupported, isStarted, postmanaged, setExecutorName, setIdleCommand, setIdleDelay, setThreadFactoryName, start, stop, unmanaged |
| 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 |
| Methods inherited from interface org.norther.tammi.core.thread.Timeout |
|---|
getExecutorName, getThreadFactoryName, setExecutorName, setThreadFactoryName |
| Methods inherited from interface org.norther.tammi.core.base.Startable |
|---|
isStarted, start, stop |
| Constructor Detail |
|---|
public DefaultTimeout()
| Method Detail |
|---|
public boolean isLoggingEnabled()
Timeout
isLoggingEnabled in interface Timeoutpublic void setLoggingEnabled(boolean flag)
Timeout
setLoggingEnabled in interface Timeoutflag - true if logging is enabled, false otherwise.
public Future execute(Runnable command,
long timeout)
Timeout
execute in interface Timeoutcommand - the runnable to execute.timeout - the timeout in msecs.
public Future execute(Callable command,
long timeout)
Timeout
execute in interface Timeoutcommand - the callable to execute.timeout - the timeout in msecs.
public Future close(ServerSocket socket,
long timeout,
boolean interrupt)
Timeout
close in interface Timeoutsocket - the socket to close.timeout - the timeout in msecs.interrupt - interrupt this thread before closing if true.
public Future close(Socket socket,
long timeout,
boolean interrupt)
Timeout
close in interface Timeoutsocket - the socket to close.timeout - the timeout in msecs.interrupt - interrupt this thread before closing if true.
public Future close(Closeable target,
long timeout,
boolean interrupt)
Timeout
close in interface Timeouttarget - the closeable to close.timeout - the timeout in msecs.interrupt - interrupt this thread before closing if true.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||