org.msgpack.rpc.loop
Class EventLoop

java.lang.Object
  extended by 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)
           
 
Method Summary
static EventLoop defaultEventLoop()
           
 java.util.concurrent.ExecutorService getIoExecutor()
           
 java.util.concurrent.ScheduledExecutorService getScheduledExecutor()
           
 java.util.concurrent.ExecutorService getWorkerExecutor()
           
 void join()
           
protected abstract  ServerTransport listenTcpTransport(TcpServerConfig config, Server server)
           
 ServerTransport listenTransport(ServerConfig config, Server server)
           
protected abstract  ClientTransport openTcpTransport(TcpClientConfig config, Session session)
           
 ClientTransport openTransport(ClientConfig config, Session session)
           
static void setDefaultEventLoop(EventLoop eventLoop)
           
static void setFactory(EventLoopFactory factory)
           
 void shutdown()
           
static EventLoop start()
           
static EventLoop start(java.util.concurrent.ExecutorService workerExecutor)
           
static EventLoop start(java.util.concurrent.ExecutorService workerExecutor, java.util.concurrent.ExecutorService ioExecutor)
           
static EventLoop start(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
 

Constructor Detail

EventLoop

public EventLoop(java.util.concurrent.ExecutorService workerExecutor,
                 java.util.concurrent.ExecutorService ioExecutor,
                 java.util.concurrent.ScheduledExecutorService scheduledExecutor)
Method Detail

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.