com.sleepycat.je.rep.utilint
Class ServiceDispatcher.ExecutingService
java.lang.Object
com.sleepycat.je.rep.utilint.ServiceDispatcher.ExecutingService
- Direct Known Subclasses:
- GroupService, LDiffService, MonitorService, NodeStateService
- Enclosing class:
- ServiceDispatcher
public abstract static class ServiceDispatcher.ExecutingService
- extends Object
A service that is run immediately in a thread allocated to it. Subtypes
implement the getRunnable() method which provides the runnable object
for the service. This service frees up the caller from managing the the
threads associated with the service. The runnable must manage interrupts
so that it can be shut down by the underlying thread pool.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ServiceDispatcher.ExecutingService
public ServiceDispatcher.ExecutingService(String serviceName,
ServiceDispatcher dispatcher)
getRunnable
public abstract Runnable getRunnable(SocketChannel socketChannel)
requestDispatch
void requestDispatch(SocketChannel channel)
- Informs the service of a new request. The implementation of the
method must not block.
- Parameters:
channel
- the channel on which the request was made
cancel
void cancel()
- Cancel the service as part of the registration being canceled.
Copyright (c) 2004-2010 Oracle. All rights reserved.