com.sun.grizzly.arp
Class AsyncInterceptor

java.lang.Object
  extended by com.sun.grizzly.arp.AsyncInterceptor
All Implemented Interfaces:
Interceptor<ByteBuffer,SocketChannel>

public class AsyncInterceptor
extends Object
implements Interceptor<ByteBuffer,SocketChannel>

Determine if a request can be executed using an AsyncHandler or not.

Author:
Jeanfrancois Arcand

Field Summary
protected  ArrayList<byte[]> allowed
           
 
Fields inherited from interface com.sun.grizzly.util.Interceptor
BREAK, CONTINUE, REQUEST_BUFFERED, REQUEST_LINE_PARSED, RESPONSE_PROCEEDED
 
Constructor Summary
AsyncInterceptor()
           
 
Method Summary
 void addContextPath(String s)
          Add a context-path that will be allowed to execute under AsyncHandler.
 void attachChannel(SocketChannel socketChannel)
          The Channel associated with this handler.
 int handle(ByteBuffer bb, int handlerCode)
          Introspect the request and determine if the target url can execute under AsyncHandler or not.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

allowed

protected ArrayList<byte[]> allowed
Constructor Detail

AsyncInterceptor

public AsyncInterceptor()
Method Detail

handle

public int handle(ByteBuffer bb,
                  int handlerCode)
           throws IOException
Introspect the request and determine if the target url can execute under AsyncHandler or not.

Specified by:
handle in interface Interceptor<ByteBuffer,SocketChannel>
Parameters:
bb - The current byteBuffer.
handlerCode - - no used.
Returns:
An Interceptor value determining if an AsyncHandler should be allowed to execute or not.
Throws:
IOException

attachChannel

public void attachChannel(SocketChannel socketChannel)
Description copied from interface: Interceptor
The Channel associated with this handler.

Specified by:
attachChannel in interface Interceptor<ByteBuffer,SocketChannel>

addContextPath

public void addContextPath(String s)
Add a context-path that will be allowed to execute under AsyncHandler.

Parameters:
s - a context-path that will be allowed to execute under AsyncHandler.


Copyright © 2012 Oracle Corporation. All Rights Reserved.