com.sun.grizzly.arp
Class AsyncInterceptor
java.lang.Object
com.sun.grizzly.arp.AsyncInterceptor
- All Implemented Interfaces:
- Interceptor<java.nio.ByteBuffer,java.nio.channels.SocketChannel>
public class AsyncInterceptor
- extends java.lang.Object
- implements Interceptor<java.nio.ByteBuffer,java.nio.channels.SocketChannel>
Determine if a request can be executed using an AsyncHandler or not.
- Author:
- Jeanfrancois Arcand
|
Field Summary |
protected java.util.ArrayList<byte[]> |
allowed
|
|
Method Summary |
void |
addContextPath(java.lang.String s)
Add a context-path that will be allowed to execute under AsyncHandler. |
void |
attachChannel(java.nio.channels.SocketChannel socketChannel)
|
int |
handle(java.nio.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 |
allowed
protected java.util.ArrayList<byte[]> allowed
AsyncInterceptor
public AsyncInterceptor()
handle
public int handle(java.nio.ByteBuffer bb,
int handlerCode)
throws java.io.IOException
- Introspect the request and determine if the target url can
execute under
AsyncHandler or not.
- Specified by:
handle in interface Interceptor<java.nio.ByteBuffer,java.nio.channels.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:
java.io.IOException
attachChannel
public void attachChannel(java.nio.channels.SocketChannel socketChannel)
- Specified by:
attachChannel in interface Interceptor<java.nio.ByteBuffer,java.nio.channels.SocketChannel>
addContextPath
public void addContextPath(java.lang.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.