com.sun.grizzly.arp
Class AsyncInterceptor
java.lang.Object
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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
allowed
protected ArrayList<byte[]> allowed
AsyncInterceptor
public AsyncInterceptor()
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.