
public class UIBusImpl extends AbstractBus implements IUIBus
IUIBus interfacebusStrategy, communicationModule, context, OPTIONAL_URI_PREFIX, registry, spaceManager| Modifier and Type | Method and Description |
|---|---|
void |
abortDialog(String callerID,
String dialogID)
Aborts the dialog upon request from the application or Dialog Manager.
|
void |
adaptationParametersChanged(IDialogManager dm,
UIRequest uiRequest,
String changedProp)
Only the Dialog Manager (DM) can call this method.
|
void |
addNewProfile(String handlerID,
UIHandlerProfile newProfile)
|
void |
assessContentSerialization(Resource content) |
void |
brokerUIRequest(String callerID,
UIRequest req)
Asks the bus to find an appropriate UI handler and forward the request to
it for handling
|
protected BusStrategy |
createBusStrategy(CommunicationModule commModule) |
void |
dialogFinished(String handlerID,
UIResponse response)
|
void |
dialogSuspended(IDialogManager dm,
String dialogID)
Only the Dialog Manager (DM) can call this method.
|
UIHandlerProfile[] |
getMatchingProfiles(String modalityRegex)
Returns list of
UIHandlerProfiles that match the given expression |
static ModuleContext |
getModuleContext() |
static Object[] |
getUIBusFetchParams() |
void |
handleSendError(ChannelMessage message,
CommunicationConnectorException e)
Callback for error handling
|
void |
removeMatchingProfile(String handlerID,
UIHandlerProfile oldProfile)
|
void |
resumeDialog(String callerID,
String dialogID,
Resource dialogData)
Applications can use this method to ask the
IUIBus to resume a
dialog that was interrupted due to the activation of a sub-dialog of it. |
void |
setDialogManager(IDialogManager dm) |
static void |
startModule(Container c,
ModuleContext mc,
Object[] uiBusShareParams,
Object[] uiBusFetchParams) |
static void |
stopModule() |
void |
unregister(String memberID,
BusMember m)
Unregisters bus member from the bus (if the bus member with given ID
exists).
|
void |
unregister(String callerID,
UICaller caller)
Unregisters an application's caller from the bus.
|
void |
unregister(String handlerID,
UIHandler handler)
Unregisters the given
UIHandler from the bus.. |
void |
userLoggedIn(String handlerID,
Resource user,
AbsLocation loginLocation)
|
addRegistryListener, brokerMessage, createBusSpecificID, createRegistry, dispose, getBrokerName, getBusMember, getBusMemberID, getBusMembers, getBusMembersByID, getCurrentNumberOfPeers, getPeerCard, getPeerFromBusResourceURI, getURI, init, initBrokerage, isBusResourceURI, isValidMember, messageReceived, register, removeRegistryListener, unmarshallpublic static Object[] getUIBusFetchParams()
public void assessContentSerialization(Resource content)
public static void startModule(Container c, ModuleContext mc, Object[] uiBusShareParams, Object[] uiBusFetchParams)
public static void stopModule()
public static ModuleContext getModuleContext()
ModuleContextprotected BusStrategy createBusStrategy(CommunicationModule commModule)
createBusStrategy in class AbstractBuspublic void setDialogManager(IDialogManager dm)
dm - IDialogManagerpublic void abortDialog(String callerID, String dialogID)
IUIBusabortDialog in interface IUIBuscallerID - ID of the application that had originally started the dialogdialogID - ID of the dialogpublic void adaptationParametersChanged(IDialogManager dm, UIRequest uiRequest, String changedProp)
IUIBusIUIBus by calling this
method. The IUIBus may then either notify the UIHandler
in charge of that dialog to consider the changes (if the changes in the
adaptation parameters still match its profile -- see also
UIHandler.adaptationParametersChanged(String, String, Object)) or
switch to another UIHandler (if the new situation cannot be
handled by the previous UIHandler). In the latter case, the
previous UIHandler is notified to abort the dialog while
returning any intermediate user input collected so far (by calling
UIHandler.cutDialog(String)), and then the new UIHandler
is mandated (by calling UIHandler.handleUICall(UIRequest)) to
continue with the dialog presentation without loss of data.adaptationParametersChanged in interface IUIBusdm - Dialog ManageruiRequest - The whole call context that is affected by the change,
including the dialog ID and the the new value of the changed
propertychangedProp - the property (from among all properties of the call context)
that has changedpublic void addNewProfile(String handlerID, UIHandlerProfile newProfile)
IUIBusUIHandler) with
regard to UIRequests that it can handle. Responsible (together
with IUIBus.removeMatchingProfile(String, UIHandlerProfile)) for
changing the handler's profile dynamically.addNewProfile in interface IUIBushandlerID - ID of the UIHandler introducing the new registration
parametersnewProfile - the new class of UIRequests that can additionally be
handled by the given UIHandlerpublic void dialogFinished(String handlerID, UIResponse response)
IUIBusdialogFinished in interface IUIBushandlerID - ID of the UIHandler that has finished the dialogpublic void dialogSuspended(IDialogManager dm, String dialogID)
IUIBusUIRequest with a higher priority than the running one is
addressing the same user, or because the user wants to switch to another
dialog using the "standard buttons"), then it must notify the
IUIBus by calling this method. The IUIBus will then ask
the UIHandler in charge of handling the running dialog to cut
that dialog (see UIHandler.cutDialog(String)) and return all user
input collected so far so that the dialog can be resumed later without
loss of data.dialogSuspended in interface IUIBusdm - Dialog ManagerdialogID - ID of the dialog to suspendpublic void removeMatchingProfile(String handlerID, UIHandlerProfile oldProfile)
IUIBusUIRequests from the profile of the
UIHandler. Responsible (together with
IUIBus.addNewProfile(String, UIHandlerProfile)) for changing the
handler's profile dynamically.removeMatchingProfile in interface IUIBushandlerID - ID of the calling UIHandler that had previously
registered 'oldProfile'public void resumeDialog(String callerID, String dialogID, Resource dialogData)
IUIBusIUIBus to resume a
dialog that was interrupted due to the activation of a sub-dialog of it.
This is the only case where the applications are aware about a dialog
having been suspended because the resumption depends on them having
processed the user input in the context of the sub-dialog and having
incorporated it into the form data of the parent dialog if needed. Then,
they can activate the parent dialog using this method.resumeDialog in interface IUIBuscallerID - ID of the application that had originally started the dialogdialogID - ID of the dialogdialogData - dialog data (see Form.getData())public void brokerUIRequest(String callerID, UIRequest req)
brokerUIRequest in interface IUIBuscallerID - the ID of the UICaller that is asking the busreq - the request to be forwarded to a UI handlerIUIBus.brokerUIRequest(java.lang.String,
org.universAAL.middleware.ui.UIRequest)public void unregister(String callerID, UICaller caller)
IUIBusunregister in interface IUIBuscallerID - ID of the caller to be unregisteredcaller - the caller to be unregisteredpublic void unregister(String handlerID, UIHandler handler)
IUIBusUIHandler from the bus..unregister in interface IUIBushandlerID - ID of the handler to be unregisteredhandler - the handler to be unregisteredpublic void unregister(String memberID, BusMember m)
AbstractBusunregister in class AbstractBuspublic void userLoggedIn(String handlerID, Resource user, AbsLocation loginLocation)
IUIBususerLoggedIn in interface IUIBushandlerID - id of the UIHandler which is received when registering
to the IUIBus. It must be passed to the bus when
calling bus methods.user - human User. It is declared as Resource because the
type User is defined in the Profiling Ontology. The type is
not needed for for matchmaking Either.loginLocation - login Location of the Userpublic void handleSendError(ChannelMessage message, CommunicationConnectorException e)
MessageListenerhandleSendError in interface MessageListenerpublic UIHandlerProfile[] getMatchingProfiles(String modalityRegex)
UIHandlerProfiles that match the given expressiongetMatchingProfiles in interface IUIBusmodalityRegex - - regular expression used for matching
UIHandlerProfiles modalitiesUIHandlerProfilesCopyright © 2018 universAAL Consortium. All rights reserved.