com.sun.xml.ws.transport.tcp.server.tomcat.grizzly10
Class HttpRedirectorProtocolHandler

java.lang.Object
  extended by com.sun.xml.ws.transport.tcp.server.tomcat.grizzly10.HttpRedirectorProtocolHandler
All Implemented Interfaces:
com.sun.enterprise.web.portunif.ProtocolHandler

public class HttpRedirectorProtocolHandler
extends java.lang.Object
implements com.sun.enterprise.web.portunif.ProtocolHandler

Redirect the request to the proper protocol, which can be http or https.


Field Summary
protected  java.lang.String[] protocols
          The protocols supported by this handler.
 
Constructor Summary
HttpRedirectorProtocolHandler(int redirectPort)
           
 
Method Summary
 boolean expireKey(java.nio.channels.SelectionKey key)
          Invoked when the SelectorThread is about to expire a SelectionKey.
 java.lang.String[] getProtocols()
          Returns an array of supported protocols.
 void handle(com.sun.enterprise.web.portunif.util.ProtocolInfo protocolInfo)
          Redirect the request to the protocol defined in the protocolInfo.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

protocols

protected java.lang.String[] protocols
The protocols supported by this handler.

Constructor Detail

HttpRedirectorProtocolHandler

public HttpRedirectorProtocolHandler(int redirectPort)
Method Detail

handle

public void handle(com.sun.enterprise.web.portunif.util.ProtocolInfo protocolInfo)
            throws java.io.IOException
Redirect the request to the protocol defined in the protocolInfo. Protocols supported are http and https.

Specified by:
handle in interface com.sun.enterprise.web.portunif.ProtocolHandler
Parameters:
protocolInfo - The protocol that needs to be redirected.
Throws:
java.io.IOException

getProtocols

public java.lang.String[] getProtocols()
Returns an array of supported protocols.

Specified by:
getProtocols in interface com.sun.enterprise.web.portunif.ProtocolHandler
Returns:
an array of supported protocols.

expireKey

public boolean expireKey(java.nio.channels.SelectionKey key)
Invoked when the SelectorThread is about to expire a SelectionKey.

Specified by:
expireKey in interface com.sun.enterprise.web.portunif.ProtocolHandler
Returns:
true if the SelectorThread should expire the SelectionKey, false if not.