pyrasun.eio.services.generic
Class ServiceIOConfig

java.lang.Object
  extended bypyrasun.eio.services.generic.ServiceIOConfig

public class ServiceIOConfig
extends java.lang.Object

Centralize initialization of basic I/O objects for a generic protocol - readers, writers, and processors. This is an generalized service object intended for re-use. Right now it's tied to ReadWriteEndpoint objects and their subclasses. This sucker defaults the read and write descriptors to non-blocking I/O. You can of course override the defaults.


Constructor Summary
ServiceIOConfig(EIOGlobalContext context, EIOPoolingStrategy strategy, java.lang.String name, EIOWorkerFactory factory)
           
 
Method Summary
 ReadWriteEndpoint createEndpoint(EndpointCoordinator coord, java.nio.channels.SocketChannel channel)
          Creates a default ReadWriteEndpoint object from the given channel.
 EndpointCoordinator getIOCoordinator()
           
 void start()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServiceIOConfig

public ServiceIOConfig(EIOGlobalContext context,
                       EIOPoolingStrategy strategy,
                       java.lang.String name,
                       EIOWorkerFactory factory)
Method Detail

getIOCoordinator

public EndpointCoordinator getIOCoordinator()

createEndpoint

public ReadWriteEndpoint createEndpoint(EndpointCoordinator coord,
                                        java.nio.channels.SocketChannel channel)
Creates a default ReadWriteEndpoint object from the given channel. Override to create your own Endpoints which subclass ReadWriteEndpoint.


start

public void start()


Pyrasun EmberIO