KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > sapia > ubik > net > nio > acceptor > ErrorStateHandler


1 package org.sapia.ubik.net.nio.acceptor;
2
3 import java.nio.ByteBuffer JavaDoc;
4
5 import org.sapia.ubik.net.nio.Cycle;
6
7 /**
8  * @author Yanick Duchesne
9  *
10  * <dl>
11  * <dt><b>Copyright: </b>
12  * <dd>Copyright &#169; 2002-2005 <a HREF="http://www.sapia-oss.org">Sapia Open
13  * Source Software </a>. All Rights Reserved.</dd>
14  * </dt>
15  * <dt><b>License: </b>
16  * <dd>Read the license.txt file of the jar or visit the <a
17  * HREF="http://www.sapia-oss.org/license.html">license page </a> at the Sapia
18  * OSS web site</dd>
19  * </dt>
20  * </dl>
21  */

22 class ErrorStateHandler extends AbstractStateHandler {
23
24   ErrorStateHandler(AcceptorConfig config) {
25     super(config);
26   }
27
28   /**
29    * @see org.sapia.ubik.net.nio.acceptor.StateHandler#handle(org.sapia.ubik.net.nio.Cycle)
30    */

31   public void handle(Cycle toHandle) throws HandlerException {
32     AcceptorCycle cycle = (AcceptorCycle) toHandle;
33     cycle.getHandler().error(cycle);
34     ByteBuffer JavaDoc buf = cycle.getByteBuffer();
35     cycle.destroy();
36   }
37
38 }
39
Popular Tags