com.sun.enterprise.web.portunif
Class HttpProtocolHandler

java.lang.Object
  extended by com.sun.enterprise.web.portunif.HttpProtocolHandler
All Implemented Interfaces:
ProtocolHandler

public class HttpProtocolHandler
extends Object
implements ProtocolHandler

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

Author:
Jeanfrancois Arcand

Field Summary
protected  String[] protocols
          The protocols supported by this handler.
 
Constructor Summary
HttpProtocolHandler()
           
 
Method Summary
 boolean expireKey(SelectionKey key)
          Invoked when the SelectorThread is about to expire a SelectionKey.
 String[] getProtocols()
          Returns an array of supported protocols.
 void handle(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 String[] protocols
The protocols supported by this handler.

Constructor Detail

HttpProtocolHandler

public HttpProtocolHandler()
Method Detail

handle

public void handle(ProtocolInfo protocolInfo)
            throws IOException
Redirect the request to the protocol defined in the protocolInfo. Protocols supported are http and https.

Specified by:
handle in interface ProtocolHandler
Parameters:
protocolInfo - The protocol that needs to be redirected.
Throws:
IOException

getProtocols

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

Specified by:
getProtocols in interface ProtocolHandler
Returns:
an array of supported protocols.

expireKey

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

Specified by:
expireKey in interface ProtocolHandler
Returns:
true if the SelectorThread should expire the SelectionKey, false if not.


Copyright © 2005-2015 Oracle Corporation. All Rights Reserved.