Package org.atmosphere.cpr
Interface AsyncIOInterceptor
-
- All Known Implementing Classes:
AsyncIOInterceptorAdapter
public interface AsyncIOInterceptorA filter-like API that allow anAtmosphereInterceptorto intercept the response before it gets written back to the client. An AsyncIOInterceptor can only be used with anAtmosphereInterceptorWriter. An implementation of this class must make sure the data is written inside the intercept method because otherwise it will be lost.- Author:
- Jeanfrancois Arcand
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description byte[]error(AtmosphereResponse response, int statusCode, java.lang.String reasonPhrase)voidpostPayload(AtmosphereResponse response, byte[] data, int offset, int length)voidprePayload(AtmosphereResponse response, byte[] data, int offset, int length)voidredirect(AtmosphereResponse response, java.lang.String location)byte[]transformPayload(AtmosphereResponse response, byte[] responseDraft, byte[] data)
-
-
-
Method Detail
-
prePayload
void prePayload(AtmosphereResponse response, byte[] data, int offset, int length)
-
transformPayload
byte[] transformPayload(AtmosphereResponse response, byte[] responseDraft, byte[] data) throws java.io.IOException
- Throws:
java.io.IOException
-
postPayload
void postPayload(AtmosphereResponse response, byte[] data, int offset, int length)
-
error
byte[] error(AtmosphereResponse response, int statusCode, java.lang.String reasonPhrase)
-
redirect
void redirect(AtmosphereResponse response, java.lang.String location)
-
-