com.sun.grizzly.suspendable
Class SuspendableMonitor

java.lang.Object
  extended by com.sun.grizzly.suspendable.SuspendableMonitor

public class SuspendableMonitor
extends Object

A secondary Selector used to keep the state of a suspended connection (SelectionKey). See SuspendableFilter for more info. TODO: Add Pipelining/Multiplexing support.

Author:
Jeanfrancois Arcand

Constructor Summary
SuspendableMonitor()
          Start a new Thread with a Selector running.
 
Method Summary
 void start()
           
protected  void suspend(SuspendableFilter.KeyHandler kh)
          Suspend the ReadableChannel represented by this SuspendableFilter.KeyHandler by registering it on secondary Selector.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SuspendableMonitor

public SuspendableMonitor()
Start a new Thread with a Selector running.

Method Detail

start

public void start()

suspend

protected void suspend(SuspendableFilter.KeyHandler kh)
                throws ClosedChannelException
Suspend the ReadableChannel represented by this SuspendableFilter.KeyHandler by registering it on secondary Selector.

Parameters:
kh - The KeyHandler which hold the current SelectionKey.
Throws:
ClosedChannelException


Copyright © 2011 SUN Microsystems. All Rights Reserved.