jGCS Documentation

net.sf.jgcs
Class AbstractPollingDataSession

java.lang.Object
  extended by net.sf.jgcs.AbstractDataSession
      extended by net.sf.jgcs.AbstractPollingDataSession
All Implemented Interfaces:
DataSession

public abstract class AbstractPollingDataSession
extends AbstractDataSession

Data session that directly polls I/O. This is often used for simple protocols that do not have associated control sessions. It probably should not be used with AbstractPollingProtocol.

Author:
Jose Pereira

Field Summary
protected  java.util.concurrent.ExecutorService pool
           
protected  java.lang.Runnable task
           
 
Constructor Summary
protected AbstractPollingDataSession(AbstractProtocol protocol, GroupConfiguration group)
           
 
Method Summary
protected  void boot()
           
protected abstract  void cleanup()
           
 void close()
          Closes the session.
protected abstract  Message read()
           
 
Methods inherited from class net.sf.jgcs.AbstractDataSession
getGroup, notifyExceptionListeners, notifyMessageListeners, notifyServiceListeners, setExceptionListener, setMessageListener, setServiceListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sf.jgcs.DataSession
createMessage, multicast, send
 

Field Detail

pool

protected java.util.concurrent.ExecutorService pool

task

protected java.lang.Runnable task
Constructor Detail

AbstractPollingDataSession

protected AbstractPollingDataSession(AbstractProtocol protocol,
                                     GroupConfiguration group)
Method Detail

boot

protected void boot()
Overrides:
boot in class AbstractDataSession

close

public void close()
Description copied from interface: DataSession
Closes the session. All resources that the session holds should be freed and therefore no subsequent communication can be done.

Specified by:
close in interface DataSession
Overrides:
close in class AbstractDataSession

read

protected abstract Message read()
                         throws java.io.IOException
Throws:
java.io.IOException

cleanup

protected abstract void cleanup()

jGCS Documentation

Copyright (c) 2006, Universidade de Lisboa
For updates and related information please see jGCS home page