org.msgpack.rpc.loop
Class EventLoop
java.lang.Object
org.msgpack.rpc.loop.EventLoop
- Direct Known Subclasses:
- NettyEventLoop
public abstract class EventLoop
- extends java.lang.Object
Constructor Summary |
EventLoop(java.util.concurrent.ExecutorService workerExecutor,
java.util.concurrent.ExecutorService ioExecutor,
java.util.concurrent.ScheduledExecutorService scheduledExecutor)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EventLoop
public EventLoop(java.util.concurrent.ExecutorService workerExecutor,
java.util.concurrent.ExecutorService ioExecutor,
java.util.concurrent.ScheduledExecutorService scheduledExecutor)
setFactory
public static void setFactory(EventLoopFactory factory)
setDefaultEventLoop
public static void setDefaultEventLoop(EventLoop eventLoop)
defaultEventLoop
public static EventLoop defaultEventLoop()
start
public static EventLoop start()
start
public static EventLoop start(java.util.concurrent.ExecutorService workerExecutor)
start
public static EventLoop start(java.util.concurrent.ExecutorService workerExecutor,
java.util.concurrent.ExecutorService ioExecutor)
start
public static EventLoop start(java.util.concurrent.ExecutorService workerExecutor,
java.util.concurrent.ExecutorService ioExecutor,
java.util.concurrent.ScheduledExecutorService scheduledExecutor)
getWorkerExecutor
public java.util.concurrent.ExecutorService getWorkerExecutor()
getIoExecutor
public java.util.concurrent.ExecutorService getIoExecutor()
getScheduledExecutor
public java.util.concurrent.ScheduledExecutorService getScheduledExecutor()
shutdown
public void shutdown()
join
public void join()
throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
openTransport
public ClientTransport openTransport(ClientConfig config,
Session session)
listenTransport
public ServerTransport listenTransport(ServerConfig config,
Server server)
throws java.io.IOException
- Throws:
java.io.IOException
openTcpTransport
protected abstract ClientTransport openTcpTransport(TcpClientConfig config,
Session session)
listenTcpTransport
protected abstract ServerTransport listenTcpTransport(TcpServerConfig config,
Server server)
Copyright © 2010. All Rights Reserved.