public class RedirectionModule extends java.lang.Object implements HTTPClientModule
Title: Framework Support Library
Description: This module handles the redirection status codes 301, 302, 303, 305, 306 and 307.
Copyright: Copyright (c) 2012
Company: StreamScape Technologies
REQ_CONTINUE, REQ_NEWCON_RST, REQ_NEWCON_SND, REQ_RESPONSE, REQ_RESTART, REQ_RETURN, REQ_SHORTCIRC, RSP_CONTINUE, RSP_NEWCON_REQ, RSP_NEWCON_SND, RSP_REQUEST, RSP_RESTART, RSP_SEND, RSP_SHORTCIRC
Modifier and Type | Method and Description |
---|---|
int |
requestHandler(Request req,
Response[] resp)
Invoked by the com.streamscape.lib.http.
|
void |
responsePhase1Handler(Response resp,
RoRequest req)
Invoked by the com.streamscape.lib.http.
|
int |
responsePhase2Handler(Response resp,
Request req)
Invoked by the com.streamscape.lib.http.
|
void |
responsePhase3Handler(Response resp,
RoRequest req)
Invoked by the com.streamscape.lib.http.
|
void |
trailerHandler(Response resp,
RoRequest req)
Invoked by the com.streamscape.lib.http.
|
public int requestHandler(Request req, Response[] resp)
requestHandler
in interface HTTPClientModule
req
- the request - may be modified as neededresp
- the response if the status is REQ_RESPONSE or REQ_RETURNpublic void responsePhase1Handler(Response resp, RoRequest req) throws java.io.IOException
responsePhase1Handler
in interface HTTPClientModule
resp
- the response - may be modifiedreq
- the original requestjava.io.IOException
- if an IOException occurs on the socketpublic int responsePhase2Handler(Response resp, Request req) throws java.io.IOException
responsePhase2Handler
in interface HTTPClientModule
resp
- the response - may be modifiedreq
- the request; if the status is RSP_REQUEST then this
must contain the new request; however do not modify
this if you don't return a RSP_REQUEST status.java.io.IOException
- if an IOException occurs on the socketpublic void responsePhase3Handler(Response resp, RoRequest req)
responsePhase3Handler
in interface HTTPClientModule
resp
- the response - may be modifiedreq
- the original requestpublic void trailerHandler(Response resp, RoRequest req)
trailerHandler
in interface HTTPClientModule
resp
- the responsereq
- the requestCopyright © 2015-2024 StreamScape Technologies. All rights reserved.