Class HttpRedirectPolicy

Using HttpRedirectPolicy, application developers can more control over HTTP redirect in a clustered environment. Application developers can specify the policy using WebSocketFactory.setDefaultRedirectPolicy() that will be inherited by all the WebSocket objects that are created from the factory. The policy can be overridden on individual connection basis using WebSocket.setRedirectPolicy().

The pre-defined policies are HttpRedirectPolicy.ALWAYS, HttpRedirectPolicy.NEVER, HttpRedirectPolicy.PEER_DOMAIN, HttpRedirectPolicy.SAME_DOMAIN, HttpRedirectPolicy.SAME_ORIGIN, and HttpRedirectPolicy.SUB_DOMAIN.


Field Summary
<static> HttpRedirectPolicy ALWAYS
          (Read only) Follow HTTP redirect requests always regardless of the origin, host, domain, etc.
<static> HttpRedirectPolicy NEVER
          (Read only) Do not follow HTTP redirects.
<static> HttpRedirectPolicy PEER_DOMAIN
          (Read only) Follow HTTP redirect only if the redirected request is for a peer-domain.
<static> HttpRedirectPolicy SAME_DOMAIN
          (Read only) Follow HTTP redirect only if the redirected request is for same domain.
<static> HttpRedirectPolicy SAME_ORIGIN
          (Read only) Follow HTTP redirect only if the redirected request is for same origin.
<static> HttpRedirectPolicy SUB_DOMAIN
          (Read only) Follow HTTP redirect only if the redirected request is for child-domain or sub-domain of the original request.
 
Constructor Summary
HttpRedirectPolicy()
            Do not create a new instance of HttpRedirectPolicy.
 
Method Summary
 boolean isRedirectAllowed(originalLoc, redirectLoc)
           Returns true if the policy allows redirecting from the original URI to the redirect URI.
 string toString()
           Returns the policy name.
 
Field Detail

ALWAYS

<static> HttpRedirectPolicy ALWAYS

NEVER

<static> HttpRedirectPolicy NEVER

PEER_DOMAIN

<static> HttpRedirectPolicy PEER_DOMAIN

SAME_DOMAIN

<static> HttpRedirectPolicy SAME_DOMAIN

SAME_ORIGIN

<static> HttpRedirectPolicy SAME_ORIGIN

SUB_DOMAIN

<static> HttpRedirectPolicy SUB_DOMAIN

Constructor Detail

HttpRedirectPolicy

HttpRedirectPolicy()

Method Detail

isRedirectAllowed

boolean isRedirectAllowed(originalLoc, redirectLoc)

toString

string toString()

Documentation generated by JsDoc Toolkit 1.3.3 on Thu Sep 25 2014 15:48:01 GMT-0700 (PDT)