org.universAAL.kinect.adapter.defaultComponents
Class DefaultBroker

Package class diagram package DefaultBroker
java.lang.Object
  extended by org.universAAL.kinect.adapter.defaultComponents.DefaultBroker
All Implemented Interfaces:
IMessageBroker

public class DefaultBroker
extends Object
implements IMessageBroker

This class is a default implementation of the IMessageBroker. This class maps the given messages to universAAL objects, thus routes the messages for the desired objects.


Field Summary
static int CONTEXTPUBLISH
          The type identifier of a ContextPublish
static int SERVICECALL
          The type identifier of a ServiceCall
 
Constructor Summary
DefaultBroker(IServiceCall service, IContextPublisher context)
           
 
Method Summary
 void add(Object key, Object req)
           
 Collection<?> SendNewMessage(Object type, Object key, Collection<?> args)
          This method sends a new message to the broker.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SERVICECALL

public static final int SERVICECALL
The type identifier of a ServiceCall

See Also:
Constant Field Values

CONTEXTPUBLISH

public static final int CONTEXTPUBLISH
The type identifier of a ContextPublish

See Also:
Constant Field Values
Constructor Detail

DefaultBroker

public DefaultBroker(IServiceCall service,
                     IContextPublisher context)
Method Detail

add

public final void add(Object key,
                      Object req)

SendNewMessage

public final Collection<?> SendNewMessage(Object type,
                                          Object key,
                                          Collection<?> args)
                                   throws AdapterException
Description copied from interface: IMessageBroker
This method sends a new message to the broker.

Specified by:
SendNewMessage in interface IMessageBroker
Parameters:
type - Type of the message, for example ServiceCall or ContextPublish
key - Key to identify the concrete object
args - Arguments forwarded to universAAl
Returns:
Collection of any return values that may occur
Throws:
AdapterException


Copyright © 2014 universAAL Consortium. All Rights Reserved.