org.universAAL.middleware.ui.impl
Class UIStrategyCaller

Package class diagram package UIStrategyCaller
java.lang.Object
  extended by java.lang.Thread
      extended by org.universAAL.middleware.bus.model.BusStrategy
          extended by org.universAAL.middleware.ui.impl.generic.EventBasedStrategy
              extended by org.universAAL.middleware.ui.impl.generic.CallBasedStrategy
                  extended by org.universAAL.middleware.ui.impl.generic.CoordinatedStrategy
                      extended by org.universAAL.middleware.ui.impl.generic.CoordinatedRegistrationManagement
                          extended by org.universAAL.middleware.ui.impl.UIStrategyCoordinatorMng
                              extended by org.universAAL.middleware.ui.impl.UIStrategyHandler
                                  extended by org.universAAL.middleware.ui.impl.UIStrategyCaller
All Implemented Interfaces:
Runnable, SharedObjectListener, AALSpaceListener

public class UIStrategyCaller
extends UIStrategyHandler

This part of the UIStrategy Stack deals only with communications between the UICallers and the IDialogManager.

UIStrategy messages

the messages exchaged are:
  1. Request: the UICaller notifies the IDialogManager there is a new UIRequest it whants to display to a user. When ready a UIResponse will be delivered.
  2. suspend a dialog: the UICaller notifies the IDialogManager a dialog should be suspendend for later resume.
  3. resume a dialog: a notification for resuming a previously suspended dialog.
  4. abort a dialog: a dialog is no longer valid the UICaller calls for its removal, the data inputed until cancelation will be delibered. Aborts may also be instructed by the IDialogManager in representation of the user.

Author:
amedrano

Nested Class Summary
 class UIStrategyCaller.UIRequestCall
           
 
Nested classes/interfaces inherited from class org.universAAL.middleware.ui.impl.generic.CoordinatedStrategy
CoordinatedStrategy.CoordinatorAlreadyExistsException
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class org.universAAL.middleware.ui.impl.UIStrategyHandler
LAST_USED_HANDLER_MATCH_LEVEL_ADDITION, lastUsedHandler, runningDialogs
 
Fields inherited from class org.universAAL.middleware.ui.impl.UIStrategyCoordinatorMng
dialogManager
 
Fields inherited from class org.universAAL.middleware.ui.impl.generic.CoordinatedRegistrationManagement
PROP_uAAL_REGISTRATION, PROP_uAAL_REGISTRATION_ID
 
Fields inherited from class org.universAAL.middleware.ui.impl.generic.CoordinatedStrategy
TYPE_uAAL_UI_BUS_COORDINATOR_BROADCAST, TYPE_uAAL_UI_BUS_COORDINATOR_REQUEST, TYPE_uAAL_UI_BUS_COORDINATOR_RESIGN
 
Fields inherited from class org.universAAL.middleware.bus.model.BusStrategy
bus, busModule, commModule
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
UIStrategyCaller(CommunicationModule commModule)
           
UIStrategyCaller(CommunicationModule commModule, String name)
           
 
Method Summary
 void abortAllPendingRequestsFor(UICaller caller)
          A caller is unregistering, and it will be no more reachable, all of its pending requests must be aborted.
 void close()
          
protected  void lostCoordinator()
          Peer will notify that communication channel is broken and then notify an abort on all pending requests, for all local UICallers
protected  void notifyCallerDialogSubmitted(UIResponse response)
          
 void peerLost(PeerCard peer)
          Coordinator will abort all pending request of the lost peer
 void start()
          
 
Methods inherited from class org.universAAL.middleware.ui.impl.UIStrategyHandler
cutDialog
 
Methods inherited from class org.universAAL.middleware.ui.impl.generic.CoordinatedRegistrationManagement
addRegistration, getRegistryID, isIdRegistered, registryIdIterator, registryIterator, removeAllRegistries, removeMatchingRegistries
 
Methods inherited from class org.universAAL.middleware.ui.impl.generic.CoordinatedStrategy
aalSpaceJoined, aalSpaceLost, aalSpaceStatusChanged, getCoordinator, iAmCoordinator, newPeerJoined, requestBecomeACoordinator, resignFromCoordinator, sharedObjectAdded, sharedObjectRemoved
 
Methods inherited from class org.universAAL.middleware.ui.impl.generic.CallBasedStrategy
abortAll, abortCall, handle, placeAsynchronousRequest, placeAsynchronousRequest, placeSynchronousRequest, placeSynchronousRequest, sendAsynchronousResponse, sendAsynchronousResponse, sendSynchronousResponse
 
Methods inherited from class org.universAAL.middleware.ui.impl.generic.EventBasedStrategy
sendEventToRemoteBusMember, sendEventToRemoteBusMember, sendEventToRemoteBusMember, sendEventToRemoteBusMember, sendEventToRemoteBusMember
 
Methods inherited from class org.universAAL.middleware.bus.model.BusStrategy
buildChannelMessage, getBusMember, getLocalBusByName, handleMessage, run, send, setBus, stopThread
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UIStrategyCaller

public UIStrategyCaller(CommunicationModule commModule,
                        String name)
Parameters:
commModule -
name -

UIStrategyCaller

public UIStrategyCaller(CommunicationModule commModule)
Parameters:
commModule -
Method Detail

start

public void start()

Overrides:
start in class UIStrategyHandler

notifyCallerDialogSubmitted

protected void notifyCallerDialogSubmitted(UIResponse response)

Specified by:
notifyCallerDialogSubmitted in class UIStrategyHandler

close

public void close()

Overrides:
close in class UIStrategyHandler

abortAllPendingRequestsFor

public void abortAllPendingRequestsFor(UICaller caller)
A caller is unregistering, and it will be no more reachable, all of its pending requests must be aborted.

Parameters:
caller -

peerLost

public void peerLost(PeerCard peer)
Coordinator will abort all pending request of the lost peer

Specified by:
peerLost in interface AALSpaceListener
Overrides:
peerLost in class UIStrategyHandler

lostCoordinator

protected void lostCoordinator()
Peer will notify that communication channel is broken and then notify an abort on all pending requests, for all local UICallers

Overrides:
lostCoordinator in class UIStrategyHandler


Copyright © 2014 universAAL Consortium. All Rights Reserved.