org.universAAL.middleware.ui
Class UICaller

Package class diagram package UICaller
java.lang.Object
  extended by org.universAAL.middleware.bus.member.BusMember
      extended by org.universAAL.middleware.bus.member.Caller
          extended by org.universAAL.middleware.ui.UICaller
Direct Known Subclasses:
DialogManagerImpl, OPublisher, SimpleUI, UIPreferencesUICaller, UIProvider, UtilUICaller, WrapperUI

public abstract class UICaller
extends Caller

Provides the interface to be implemented by applications together with shared code. Only instances of this class can send UIRequests. The convention of the IUIBus regarding the registration parameters is the following:

Author:
mtazari, eandgrg

Field Summary
 
Fields inherited from class org.universAAL.middleware.bus.member.BusMember
busResourceURI, owner, theBus
 
Constructor Summary
protected UICaller(ModuleContext context)
          Instantiates a new UICaller.
 
Method Summary
 void abortDialog(String dialogID)
          Abort dialog.
 void adaptationParametersChanged(UIRequest call, String changedProp)
          Adaptation parameters changed.
 void busDyingOut(AbstractBus bus)
          This method is called when the bus is stopped to announce this to the bus members.
abstract  void communicationChannelBroken()
          Method to be called when the communication of the UICaller with the IDialogManager is lost.
abstract  void dialogAborted(String dialogID, Resource data)
          Dialog aborted.
 void dialogSuspended(String dialogID)
          Dialog suspended.
 String getMyID()
          Id with which the UICaller is registered in the IUIBus
 void handleReply(BusMessage msg)
          Handle reply.
abstract  void handleUIResponse(UIResponse uiResponse)
          Handle UIResponse - that comes from UIHandler carrying user input.
 void resumeDialog(String dialogID, Resource dialogData)
          Resume dialog.
 void sendUIRequest(UIRequest uiRequest)
          Sends UIRequest.
 
Methods inherited from class org.universAAL.middleware.bus.member.BusMember
close, getType, getURI
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UICaller

protected UICaller(ModuleContext context)
Instantiates a new UICaller.

Parameters:
context - the module context
Method Detail

abortDialog

public void abortDialog(String dialogID)
Abort dialog.

Parameters:
dialogID - the dialog id

adaptationParametersChanged

public final void adaptationParametersChanged(UIRequest call,
                                              String changedProp)
Adaptation parameters changed.

Parameters:
call - the UIRequest
changedProp - the changed prop

busDyingOut

public final void busDyingOut(AbstractBus bus)
Description copied from class: BusMember
This method is called when the bus is stopped to announce this to the bus members.

Specified by:
busDyingOut in class BusMember
Parameters:
bus - bus on which this member has been registered
See Also:
BusMember.busDyingOut(AbstractBus)

communicationChannelBroken

public abstract void communicationChannelBroken()
Method to be called when the communication of the UICaller with the IDialogManager is lost. Any pending request might be resend at this point. All affected pending dialogs will be aborted right after this call (with null data).


dialogAborted

public abstract void dialogAborted(String dialogID,
                                   Resource data)
Dialog aborted.

Parameters:
dialogID - the dialog id
data - the data collected up until abortion, it might be null if the data could not be retrieved.

dialogSuspended

public final void dialogSuspended(String dialogID)
Dialog suspended.

Parameters:
dialogID - the dialog id

handleReply

public final void handleReply(BusMessage msg)
Handle reply.

Parameters:
msg - the BusMessage

handleUIResponse

public abstract void handleUIResponse(UIResponse uiResponse)
Handle UIResponse - that comes from UIHandler carrying user input.

Parameters:
uiResponse - the UIResponse

resumeDialog

public void resumeDialog(String dialogID,
                         Resource dialogData)
Resume dialog.

Parameters:
dialogID - the dialog id
dialogData - the dialog data

sendUIRequest

public final void sendUIRequest(UIRequest uiRequest)
Sends UIRequest.

Parameters:
uiRequest - the UIRequest
Throws:
NullPointerException - if the ui request is null

getMyID

public String getMyID()
Id with which the UICaller is registered in the IUIBus

Returns:
UICaller ID


Copyright © 2014 universAAL Consortium. All Rights Reserved.