org.universAAL.middleware.ui.impl
Class UIStrategyHandler

Package class diagram package UIStrategyHandler
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
All Implemented Interfaces:
Runnable, SharedObjectListener, AALSpaceListener
Direct Known Subclasses:
UIStrategyCaller

public abstract class UIStrategyHandler
extends UIStrategyCoordinatorMng

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

UIStrategy messages

the messages exchaged are:
  1. userLogOn: notifies the IDialogManager when a user has logOn at a handler.
  2. NotifyHandler: the IDialogManager is sending a new UIRequest or updating an existing one.
  3. FinishDialog: the UIHandler notifies the IDialogManager a user has finishied a dialog, the UIResponse goes in this message.
  4. CutCall: this is a synchronous call, the bus is telling the UIHandler to derenderize a certain dialog, and it is expecting (and waiting) for the dataRoot of the Form.

Author:
amedrano

Nested Class Summary
 
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
static int LAST_USED_HANDLER_MATCH_LEVEL_ADDITION
          Last used handler weight is same as the dialog privacy's one.
protected  Map<String,String> lastUsedHandler
          To keep track of the last used handler per user.
protected  RunningDialogsManager runningDialogs
          The Dialogs Manager keeps track of which dialog is where and what dialog is handling each handler.
 
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
UIStrategyHandler(CommunicationModule commModule)
           
UIStrategyHandler(CommunicationModule commModule, String name)
           
 
Method Summary
 void close()
          
protected  Resource cutDialog(String handlerID, String dialogID)
           
protected  void lostCoordinator()
          on Coordination lost: reschedule reRegistration.
protected abstract  void notifyCallerDialogSubmitted(UIResponse response)
          check sender and if local send it if not send message.
 void peerLost(PeerCard peer)
          
 void start()
          
 
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
 

Field Detail

LAST_USED_HANDLER_MATCH_LEVEL_ADDITION

public static final int LAST_USED_HANDLER_MATCH_LEVEL_ADDITION
Last used handler weight is same as the dialog privacy's one.

See Also:
Constant Field Values

lastUsedHandler

protected Map<String,String> lastUsedHandler
To keep track of the last used handler per user.


runningDialogs

protected RunningDialogsManager runningDialogs
The Dialogs Manager keeps track of which dialog is where and what dialog is handling each handler.

Constructor Detail

UIStrategyHandler

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

UIStrategyHandler

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

start

public void start()

Overrides:
start in class CoordinatedRegistrationManagement

cutDialog

protected Resource cutDialog(String handlerID,
                             String dialogID)

notifyCallerDialogSubmitted

protected abstract void notifyCallerDialogSubmitted(UIResponse response)
check sender and if local send it if not send message.

Parameters:
response -

close

public void close()

Overrides:
close in class CoordinatedRegistrationManagement

peerLost

public void peerLost(PeerCard peer)

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

lostCoordinator

protected void lostCoordinator()
on Coordination lost: reschedule reRegistration.

Overrides:
lostCoordinator in class CoordinatedStrategy


Copyright © 2014 universAAL Consortium. All Rights Reserved.