pyrasun.eio.helpers
Class EIOSocketWorkerFactory

java.lang.Object
  extended bypyrasun.eio.helpers.EIOSocketWorkerFactory
All Implemented Interfaces:
EIOWorkerFactory

public abstract class EIOSocketWorkerFactory
extends java.lang.Object
implements EIOWorkerFactory

An abstract factory class for creating standard Socket read/write/process workers. Mostly automates the bookkeeping required by the EIOWorkerFactory inteface.


Constructor Summary
EIOSocketWorkerFactory()
           
 
Method Summary
abstract  EIOWorker createProcessor()
           
abstract  EIOWorker createReader()
           
 EIOWorker createWorker(EIOEvent type)
          Create a worker of the given type
abstract  EIOWorker createWriter()
           
 EIOEvent[] supportedWorkerTypes()
          Returns an array of supported Event types for this factory.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EIOSocketWorkerFactory

public EIOSocketWorkerFactory()
Method Detail

createWorker

public EIOWorker createWorker(EIOEvent type)
                       throws java.lang.IllegalArgumentException
Description copied from interface: EIOWorkerFactory
Create a worker of the given type

Specified by:
createWorker in interface EIOWorkerFactory
Throws:
java.lang.IllegalArgumentException
See Also:
for a list of valid types If the factory does not support a given worker type, it should throw an IllegalArgumentException

createReader

public abstract EIOWorker createReader()

createWriter

public abstract EIOWorker createWriter()

createProcessor

public abstract EIOWorker createProcessor()

supportedWorkerTypes

public EIOEvent[] supportedWorkerTypes()
Description copied from interface: EIOWorkerFactory
Returns an array of supported Event types for this factory.

Specified by:
supportedWorkerTypes in interface EIOWorkerFactory


Pyrasun EmberIO