NextApp Echo
App Container 1.0.5

nextapp.echoservlet
Class OutgoingUpdateQueue

java.lang.Object
  extended bynextapp.echoservlet.OutgoingUpdateQueue
All Implemented Interfaces:
java.io.Serializable

final class OutgoingUpdateQueue
extends java.lang.Object
implements java.io.Serializable

Manages outgoing updates to the client. Managed updates include:


Field Summary
private  java.util.Set closedWindows
          A set containing WindowUIs that need to be closed on the client.
private  InstancePeer instancePeer
          The InstancePeer with which this OutgoingUpdateQueue is associated.
private  java.util.Set loweredWindows
          A set containing WindowUIs that need to be lowered on the client.
private  java.util.Set openedWindows
          A set containing WindowUI's that need to be opened on the client.
private  java.util.Set paneUpdates
          A set containing all services that need to be refreshed on the client.
private  java.util.Set raisedWindows
          A set containing WindowUIs that need to be raised on the client.
private  java.util.Set windowTitleUpdates
          A set containing all WindowUI's whose titles need to be updated on the client.
private  java.util.Set windowUpdates
          A set containing all WindowUI's whose content needs to be updated on the client.
 
Constructor Summary
(package private) OutgoingUpdateQueue(InstancePeer instancePeer)
          Creates a new OutgoingUpdateQueue for the specified InstancePeer.
 
Method Summary
(package private)  void deleteComponentUpdate(ComponentPeer componentPeer)
          Removes all previously scheduled service updates for services that are descendants of the specified ComponentPeer.
(package private)  java.util.Iterator dequeuePaneUpdate()
          Returns all services (panes and windows) that are present on the client and need to be refreshed such that they are in sync with their respective server-side representations.
(package private)  java.util.Iterator dequeueWindowClose()
          Returns an iterator over all windows that are presently open on the client and need to be closed.
(package private)  java.util.Iterator dequeueWindowLower()
          Returns an iterator over all windows that need to be lowered on the client.
(package private)  java.util.Iterator dequeueWindowOpen()
          Returns an iterator over all windows that are presently closed on the client and need to be opened.
(package private)  java.util.Iterator dequeueWindowRaise()
          Returns an iterator over all windows that need to be raised on the client.
(package private)  java.util.Iterator dequeueWindowTitleUpdate()
          Returns an iterator over all open windows that need to have their titles updated on the client.
(package private)  java.util.Iterator dequeueWindowUpdate()
          Returns an iterator over all open windows that need to have their content updated on the client.
(package private)  void enqueueComponentUpdate(ComponentPeer componentPeer)
          Causes the service containing the given component to be re-rendered.
private  void enqueuePaneUpdate(ComponentPeer componentPeer)
          Adds the Service that is responsible for rendering the specified ComponentPeer to the list of services needing to be refreshed.
(package private)  void enqueueWindowClose(WindowUI windowUI)
          Removes a window from the application.
(package private)  void enqueueWindowLower(WindowUI windowUI)
          Schedules a window to be lowered to the background of the client application.
(package private)  void enqueueWindowOpen(WindowUI windowUI)
          Adds a window to the application.
(package private)  void enqueueWindowRaise(WindowUI windowUI)
          Adds the specified WindowUI to the list of windows that need to have be raised on the client.
(package private)  void enqueueWindowTitleUpdate(WindowUI windowUI)
          Adds the specified WindowUI to the list of windows that need to have their titles updated.
private  void enqueueWindowUpdate(WindowUI windowUI)
          Adds the specified WindowUI to the list of windows that need to have their content updated.
(package private)  boolean isPaneUpdateRequired()
          Returns true if there are services that need to be refreshed on the client.
(package private)  boolean isWindowCloseRequired()
          Returns true if there are windows on the client that need to be closed.
(package private)  boolean isWindowLowerRequired()
          Returns true if there are windows that need to be lowered to the background of the screen.
(package private)  boolean isWindowOpenRequired()
          Returns true if there are windows that need to be opened on the client.
(package private)  boolean isWindowRaiseRequired()
          Returns true if there are windows that need to be raised to the foreground of the screen.
(package private)  boolean isWindowTitleUpdateRequired()
          Returns true if there are windows that need their titles updated on the client.
(package private)  boolean isWindowUpdateRequired()
          Returns true if there are windows that need their content updated on the client.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

closedWindows

private java.util.Set closedWindows
A set containing WindowUIs that need to be closed on the client.


raisedWindows

private java.util.Set raisedWindows
A set containing WindowUIs that need to be raised on the client.


loweredWindows

private java.util.Set loweredWindows
A set containing WindowUIs that need to be lowered on the client.


instancePeer

private InstancePeer instancePeer
The InstancePeer with which this OutgoingUpdateQueue is associated.


openedWindows

private java.util.Set openedWindows
A set containing WindowUI's that need to be opened on the client.


paneUpdates

private java.util.Set paneUpdates
A set containing all services that need to be refreshed on the client.


windowTitleUpdates

private java.util.Set windowTitleUpdates
A set containing all WindowUI's whose titles need to be updated on the client.


windowUpdates

private java.util.Set windowUpdates
A set containing all WindowUI's whose content needs to be updated on the client.

Constructor Detail

OutgoingUpdateQueue

OutgoingUpdateQueue(InstancePeer instancePeer)
Creates a new OutgoingUpdateQueue for the specified InstancePeer. There should be one OutgoingUpdateQueue per InstancePeer.

Parameters:
instancePeer - The InstancePeer that this OutgoingUpdateQueue will handle updates for.
Method Detail

deleteComponentUpdate

void deleteComponentUpdate(ComponentPeer componentPeer)
Removes all previously scheduled service updates for services that are descendants of the specified ComponentPeer. It is necessary to remove descendant services if the componentPeer has been removed or has become invisible.

Parameters:
componentPeer - The component peer whose descendant services are to be removed.

dequeuePaneUpdate

java.util.Iterator dequeuePaneUpdate()
Returns all services (panes and windows) that are present on the client and need to be refreshed such that they are in sync with their respective server-side representations.

Returns:
An iterator of services needing to be refreshed.

dequeueWindowClose

java.util.Iterator dequeueWindowClose()
Returns an iterator over all windows that are presently open on the client and need to be closed. The controller will use the Iterator.remove() method to remove each window from this queue after it has generated script to close the window.

Returns:
An iterator of windows needing to be closed.

dequeueWindowLower

java.util.Iterator dequeueWindowLower()
Returns an iterator over all windows that need to be lowered on the client. The controller will use the Iterator.remove() method to remove each window from this queue after it has generated script to lower the window.

Returns:
An iterator of windows needing to be lowered.

dequeueWindowOpen

java.util.Iterator dequeueWindowOpen()
Returns an iterator over all windows that are presently closed on the client and need to be opened. The controller will use the Iterator.remove() method to remove each window from this queue after it has generated script to open the window.

Returns:
An iterator of windows needing to be opened.

dequeueWindowRaise

java.util.Iterator dequeueWindowRaise()
Returns an iterator over all windows that need to be raised on the client. The controller will use the Iterator.remove() method to remove each window from this queue after it has generated script to raise the window.

Returns:
An iterator of windows needing to be raised.

dequeueWindowTitleUpdate

java.util.Iterator dequeueWindowTitleUpdate()
Returns an iterator over all open windows that need to have their titles updated on the client.

Returns:
An iterator of windows needing their titles updated.

dequeueWindowUpdate

java.util.Iterator dequeueWindowUpdate()
Returns an iterator over all open windows that need to have their content updated on the client.

Returns:
An iterator of windows needing their content updated.

enqueueComponentUpdate

void enqueueComponentUpdate(ComponentPeer componentPeer)
Causes the service containing the given component to be re-rendered.

Parameters:
componentPeer - A ComponentPeer whose represented Component has changed and therefore needs to be updated on the client browser.

enqueuePaneUpdate

private void enqueuePaneUpdate(ComponentPeer componentPeer)
Adds the Service that is responsible for rendering the specified ComponentPeer to the list of services needing to be refreshed.

Parameters:
componentPeer - The component that needs to be re-rendered.

enqueueWindowClose

void enqueueWindowClose(WindowUI windowUI)
Removes a window from the application. The window will be closed on the client browser if necessary (the only case where this is not necessary is if the window is not yet open but was scheduled to be opened by a call to addWindow()).

Parameters:
windowUI - The window to be removed.

enqueueWindowLower

void enqueueWindowLower(WindowUI windowUI)
Schedules a window to be lowered to the background of the client application.

Parameters:
windowUI - The window to lower.

enqueueWindowOpen

void enqueueWindowOpen(WindowUI windowUI)
Adds a window to the application. The window will be opened on the client if necessary (the only case where this is not necessary is if the window is already opened and was scheduled to be closed by a call to removeWindow()).

Parameters:
windowUI - The window to be added.

enqueueWindowRaise

void enqueueWindowRaise(WindowUI windowUI)
Adds the specified WindowUI to the list of windows that need to have be raised on the client.

Parameters:
windowUI - the peer of a Window which should be raised on the client.

enqueueWindowTitleUpdate

void enqueueWindowTitleUpdate(WindowUI windowUI)
Adds the specified WindowUI to the list of windows that need to have their titles updated.

Parameters:
windowUI - The peer of a Window whose title has been changed.

enqueueWindowUpdate

private void enqueueWindowUpdate(WindowUI windowUI)
Adds the specified WindowUI to the list of windows that need to have their content updated.

Parameters:
windowUI - The peer of a Window whose content has been changed.

isPaneUpdateRequired

boolean isPaneUpdateRequired()
Returns true if there are services that need to be refreshed on the client.

Returns:
True if there are services that need to be refreshed on the client.

isWindowCloseRequired

boolean isWindowCloseRequired()
Returns true if there are windows on the client that need to be closed.

Returns:
True if there are windows on the client that need to be closed.

isWindowLowerRequired

boolean isWindowLowerRequired()
Returns true if there are windows that need to be lowered to the background of the screen.

Returns:
True if there are windows that need to be lowered to the background of the screen.

isWindowOpenRequired

boolean isWindowOpenRequired()
Returns true if there are windows that need to be opened on the client.

Returns:
True if there are windows that need to be opened on the client.

isWindowRaiseRequired

boolean isWindowRaiseRequired()
Returns true if there are windows that need to be raised to the foreground of the screen.

Returns:
True if there are windows that need to be raised to the foreground of the screen.

isWindowTitleUpdateRequired

boolean isWindowTitleUpdateRequired()
Returns true if there are windows that need their titles updated on the client.

Returns:
True if there are windows that need their titles updated on the client.

isWindowUpdateRequired

boolean isWindowUpdateRequired()
Returns true if there are windows that need their content updated on the client.

Returns:
True if there are windows that need their content updated on the client.

NextApp Echo
App Container 1.0.5