NextApp Echo
App Container 1.0.5

nextapp.echoservlet
Class ControllerInputProcessor

java.lang.Object
  extended bynextapp.echoservlet.ControllerInputProcessor

final class ControllerInputProcessor
extends java.lang.Object

Parses the HTTP request, storing component peers that will be used in its processing.


Field Summary
private  java.lang.String actionCommand
           
private  ClientActionProducer actionProducer
           
private  Connection conn
           
private  IncomingUpdateQueue incomingUpdateQueue
           
private  java.util.Map inputPeers
           
private  InstancePeer instancePeer
           
private  OutgoingUpdateQueue outgoingUpdateQueue
           
private  java.lang.String requestType
           
private  java.util.Map scrollPositions
           
 
Constructor Summary
private ControllerInputProcessor(Connection conn)
          Processes a controller request.
 
Method Summary
private  void doAction()
          Processes a submission of the controller's form in response to an action by the user.
private  void doWindowsClosed()
          Processes a submission of the controller's form in response to windows having been closed by the user.
private  void doWindowsMissing()
          Processes a submission of the controller's form in response to an inconsistency being found between the windows that should be open on the client and the windows that are actually open.
private  boolean isNewRequest()
          Determines whether the request to the controller is new by comparing its sequence number to that of the server.
(package private) static void process(Connection conn)
          Processes the request to the controller.
private  void storeActionData()
          Stores the ClientActionProducer object whose action was fired on the client.
private  void storeInputData(java.lang.String parameterName)
          Retrieves an input data parameter value from the HTTP request, storing it in the inputPeers map under the key of its ClientInputProducer.
private  void storeRequestData()
          Stores rendering peers that will be used in the request locally, such that they can be accessed even if they are unregistered as a result of an event fired to the application.
private  void storeScrollbarPosition(java.lang.String parameterName)
          Retrieves a scrollbar position parameter value from the HTTP request, storing it in the scrollPositions map under the key of its ContentPaneUI.
private  void updateInputData()
          Updates the state of all ClientInputProducers, notifying them of data received from the client.
private  void updateScrollbarPositions()
          Updates the scroll bar positions of any content panes whose positions were changed of their new state.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

conn

private Connection conn

instancePeer

private InstancePeer instancePeer

inputPeers

private java.util.Map inputPeers

scrollPositions

private java.util.Map scrollPositions

requestType

private java.lang.String requestType

actionProducer

private ClientActionProducer actionProducer

actionCommand

private java.lang.String actionCommand

incomingUpdateQueue

private IncomingUpdateQueue incomingUpdateQueue

outgoingUpdateQueue

private OutgoingUpdateQueue outgoingUpdateQueue
Constructor Detail

ControllerInputProcessor

private ControllerInputProcessor(Connection conn)
Processes a controller request.

Parameters:
conn - The connection provided to the Controller that contains the HTTP request to be processed.
Method Detail

process

static void process(Connection conn)
Processes the request to the controller.

Parameters:
conn - The connection provided to the Controller that contains the HTTP request to be processed.

doAction

private void doAction()
               throws InvalidClientStateException
Processes a submission of the controller's form in response to an action by the user.

Throws:
InvalidClientStateException

doWindowsClosed

private void doWindowsClosed()
Processes a submission of the controller's form in response to windows having been closed by the user. Notifies the application of the windows that were closed.


doWindowsMissing

private void doWindowsMissing()
Processes a submission of the controller's form in response to an inconsistency being found between the windows that should be open on the client and the windows that are actually open. The windows will be reopened.


isNewRequest

private boolean isNewRequest()
Determines whether the request to the controller is new by comparing its sequence number to that of the server.

Returns:
True if the request is new.

storeActionData

private void storeActionData()
                      throws InvalidClientStateException
Stores the ClientActionProducer object whose action was fired on the client. The ClientActionProducer will be notified when the doAction method is later called.

Throws:
InvalidClientStateException - if this method determines that the client browser may be in an invalid state, i.e., the ClientActionProducer does not exist.

storeInputData

private void storeInputData(java.lang.String parameterName)
                     throws InvalidClientStateException
Retrieves an input data parameter value from the HTTP request, storing it in the inputPeers map under the key of its ClientInputProducer. The ClientInputProducer will be notified of the change in its value when the updateInputData() method is later called.

Parameters:
parameterName - The name of the parameter that contains the input.
Throws:
InvalidClientStateException - if this method determines that the client browser may be in an invalid state, i.e., input data was sent for an unregistered ClientInputProducer.

storeRequestData

private void storeRequestData()
                       throws InvalidClientStateException
Stores rendering peers that will be used in the request locally, such that they can be accessed even if they are unregistered as a result of an event fired to the application.

Throws:
InvalidClientStateException

storeScrollbarPosition

private void storeScrollbarPosition(java.lang.String parameterName)
                             throws InvalidClientStateException
Retrieves a scrollbar position parameter value from the HTTP request, storing it in the scrollPositions map under the key of its ContentPaneUI. The ContentPaneUI will be notified of the change in its scroll bar positions when the updateScrollbarPositions() method is later called.

Parameters:
parameterName - The name of the parameter that contains scrollbar position information.
Throws:
InvalidClientStateException - if this method determines that the client browser may be in an invalid state.

updateInputData

private void updateInputData()
Updates the state of all ClientInputProducers, notifying them of data received from the client.


updateScrollbarPositions

private void updateScrollbarPositions()
Updates the scroll bar positions of any content panes whose positions were changed of their new state.


NextApp Echo
App Container 1.0.5