com.sun.enterprise.web.portunif
Class PortUnificationPipeline

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.AbstractSequentialList<E>
              extended by java.util.LinkedList<Task>
                  extended by com.sun.enterprise.web.connector.grizzly.LinkedListPipeline
                      extended by com.sun.enterprise.web.connector.grizzly.ssl.SSLPipeline
                          extended by com.sun.enterprise.web.portunif.PortUnificationPipeline
All Implemented Interfaces:
Pipeline, Serializable, Cloneable, Iterable<Task>, Collection<Task>, Deque<Task>, List<Task>, Queue<Task>

public class PortUnificationPipeline
extends SSLPipeline

This Pipeline goal is to try to determine the TCP protocol used (http, soap, https, etc.). First, all ProtocolFinder are executed trying to determine which protocol is used. Once the protocol is found, the associated ProtocolHandler. You can add ProtocolHandler and ProtocolFinder by doing (from a SelectorThread) SelectorThread st = SelectorThread.getSelector(port); PortUnificationPipeline php = (PortUnificationPipeline)st.getReadPipeline(); php.addProtocolFinder(..); php.addProtocolHandler(...);

Author:
Jeanfrancois Arcand
See Also:
Serialized Form

Field Summary
static String PROTOCOL_FINDERS
           
static String PROTOCOL_HANDLERS
           
 
Fields inherited from class com.sun.enterprise.web.connector.grizzly.LinkedListPipeline
isStarted, maxQueueSizeInBytes, maxThreads, minSpareThreads, minThreads, name, pipelineStat, port, priority, threadCount, threadsIncrement, threadsTimeout, waitingThreads, workerThreads
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
PortUnificationPipeline()
           
 
Method Summary
 void addProtocolFinder(ProtocolFinder protocolFinder)
          Add an instance of ProtocolFinder
 void addProtocolHandler(ProtocolHandler protocolHandler)
          Add an instance of ProtocolHandler
 void addTask(Task task)
          Seek for the TCP protocol used.
 boolean expireKey(SelectionKey key)
          Invoked when the SelectorThread is about to expire a SelectionKey.
 void removeProtocolFinder(ProtocolFinder protocolFinder)
          Remove a ProtocolFinder
 void removeProtocolHandler(ProtocolHandler protocolHandler)
          Remove a ProtocolHandler
 
Methods inherited from class com.sun.enterprise.web.connector.grizzly.ssl.SSLPipeline
increaseWorkerThread
 
Methods inherited from class com.sun.enterprise.web.connector.grizzly.LinkedListPipeline
getCurrentThreadCount, getCurrentThreadsBusy, getMaxSpareThreads, getMaxThreads, getMinSpareThreads, getName, getPipelineStatistic, getQueueSizeInBytes, getTask, getTaskQueuedCount, getWaitingThread, initPipeline, interruptThread, isEmpty, setMaxThreads, setMinSpareThreads, setMinThreads, setName, setPipelineStatistic, setPort, setPriority, setQueueSizeInBytes, setThreadsIncrement, setThreadsTimeout, startPipeline, stopPipeline, toString
 
Methods inherited from class java.util.LinkedList
add, add, addAll, addAll, addFirst, addLast, clear, clone, contains, descendingIterator, element, get, getFirst, getLast, indexOf, lastIndexOf, listIterator, offer, offerFirst, offerLast, peek, peekFirst, peekLast, poll, pollFirst, pollLast, pop, push, remove, remove, remove, removeFirst, removeFirstOccurrence, removeLast, removeLastOccurrence, set, size, toArray, toArray
 
Methods inherited from class java.util.AbstractSequentialList
iterator
 
Methods inherited from class java.util.AbstractList
equals, hashCode, listIterator, removeRange, subList
 
Methods inherited from class java.util.AbstractCollection
containsAll, removeAll, retainAll
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.sun.enterprise.web.connector.grizzly.Pipeline
size
 
Methods inherited from interface java.util.List
containsAll, equals, hashCode, iterator, listIterator, removeAll, retainAll, subList
 
Methods inherited from interface java.util.Deque
iterator
 

Field Detail

PROTOCOL_FINDERS

public static final String PROTOCOL_FINDERS
See Also:
Constant Field Values

PROTOCOL_HANDLERS

public static final String PROTOCOL_HANDLERS
See Also:
Constant Field Values
Constructor Detail

PortUnificationPipeline

public PortUnificationPipeline()
Method Detail

addTask

public void addTask(Task task)
Seek for the TCP protocol used. First all ProtocolFinder will be invoked. If the protocol is found, the associated ProtocolHandler will be executed. The execution of this method will occurs on the same thread and the main Selector (SelectorThread).

Specified by:
addTask in interface Pipeline
Overrides:
addTask in class LinkedListPipeline
Parameters:
task - An implementation of ReadTask

expireKey

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

Specified by:
expireKey in interface Pipeline
Overrides:
expireKey in class LinkedListPipeline
Returns:
true if the SelectorThread should expire the SelectionKey, false if not.

addProtocolFinder

public void addProtocolFinder(ProtocolFinder protocolFinder)
Add an instance of ProtocolFinder


addProtocolHandler

public void addProtocolHandler(ProtocolHandler protocolHandler)
Add an instance of ProtocolHandler


removeProtocolFinder

public void removeProtocolFinder(ProtocolFinder protocolFinder)
Remove a ProtocolFinder


removeProtocolHandler

public void removeProtocolHandler(ProtocolHandler protocolHandler)
Remove a ProtocolHandler



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