org.universAAL.ri.gateway.communicator.service
Interface GatewayCommunicator

Package class diagram package GatewayCommunicator
All Known Implementing Classes:
GatewayCommunicatorImpl

public interface GatewayCommunicator

This interface is used by the ImportExportManager for communication with AALSpace Gateway Communicator via an OSGi service.

Author:
skallz

Field Summary
static String ALIAS_PREFIX
          Alias' prefix under which the HTTP servlet will be registered.
static String EXPORT_SECURITY_CONSTRAINT_ALLOW
          Property used for specifying bus members that are allowed to be exported to remote AAL Spaces.
static String EXPORT_SECURITY_CONSTRAINT_DENY
          Property used for specifying bus members that are denied to be exported to remote AAL Spaces.
static String HASH_KEY
           
static String IMPORT_SECURITY_CONSTRAINT_ALLOW
          Property used for specifying bus members that are allowed to be imported into this AAL Space.
static String IMPORT_SECURITY_CONSTRAINT_DENY
          Property used for specifying bus members that are denied to be imported into this AAL Space.
static String LOCAL_SOCKET_PORT
           
static String REMOTE_GATEWAYS_PROP
          System property used for specifying remote AAL Space Gateways addresses (host ip and port) in comma separated manner.
 
Method Summary
 void handleMessage(InputStream in, OutputStream out)
           
 void sendContextEvent(Message message)
           
 void sendContextEvent(Message message, URL[] to)
          Sends a context event to other AALSpace Gateway Communicators listening at given URL.
 void sendImportRefresh(Message message)
           
 void sendImportRefresh(Message message, URL[] to)
           
 void sendImportRemoval(Message message)
           
 void sendImportRemoval(Message message, URL[] to)
           
 Message sendImportRequest(Message message)
           
 Message[] sendImportRequest(Message message, URL[] to)
           
 Message[] sendServiceRequest(Message message)
           
 Message[] sendServiceRequest(Message message, long timeout)
           
 Message[] sendServiceRequest(Message message, URL[] to)
          Sends a service request to another AALSpace Gateway Communicator listening at given URL, waits for the response and returns it.
 Message[] sendServiceRequest(Message message, URL[] to, long timeout)
          Sends a service request to another AALSpace Gateway Communicator listening at given URL, waits for the response and returns it if arrived before timing out.
 void sendServiceRequestAsync(Message message, URL returnTo, URL to, ResponseCallback callback)
          Sends a service request to another AALSpace Gateway Communicator listening at given URL, registers callback which will be notified once the response arrives.
 void sendUIRequest(Message message)
           
 void sendUIRequest(Message message, URL[] to)
          Sends a ui request to other AALSpace Gateway Communicators listening at given URL.
 void sendUIResponse(Message message)
           
 void sendUIResponse(Message message, URL[] to)
          Sends a ui response to other AALSpace Gateway Communicators listening at given URL.
 void start()
           
 void stop()
           
 

Field Detail

HASH_KEY

static final String HASH_KEY
See Also:
Constant Field Values

REMOTE_GATEWAYS_PROP

static final String REMOTE_GATEWAYS_PROP
System property used for specifying remote AAL Space Gateways addresses (host ip and port) in comma separated manner. Example: 192.168.192.1:8001,192.168.192.2.8001

See Also:
Constant Field Values

LOCAL_SOCKET_PORT

static final String LOCAL_SOCKET_PORT
See Also:
Constant Field Values

IMPORT_SECURITY_CONSTRAINT_ALLOW

static final String IMPORT_SECURITY_CONSTRAINT_ALLOW
Property used for specifying bus members that are allowed to be imported into this AAL Space. List of comma separated regular expressions related to service, context or ui URI.

See Also:
Constant Field Values

EXPORT_SECURITY_CONSTRAINT_ALLOW

static final String EXPORT_SECURITY_CONSTRAINT_ALLOW
Property used for specifying bus members that are allowed to be exported to remote AAL Spaces. List of comma separated regular expressions related to service, context or ui URI.

See Also:
Constant Field Values

IMPORT_SECURITY_CONSTRAINT_DENY

static final String IMPORT_SECURITY_CONSTRAINT_DENY
Property used for specifying bus members that are denied to be imported into this AAL Space. List of comma separated regular expressions related to service, context or ui URI.

See Also:
Constant Field Values

EXPORT_SECURITY_CONSTRAINT_DENY

static final String EXPORT_SECURITY_CONSTRAINT_DENY
Property used for specifying bus members that are denied to be exported to remote AAL Spaces. List of comma separated regular expressions related to service, context or ui URI.

See Also:
Constant Field Values

ALIAS_PREFIX

static final String ALIAS_PREFIX
Alias' prefix under which the HTTP servlet will be registered.

See Also:
Constant Field Values
Method Detail

sendServiceRequest

Message[] sendServiceRequest(Message message,
                             URL[] to)
Sends a service request to another AALSpace Gateway Communicator listening at given URL, waits for the response and returns it. Equal to sendServiceRequest(message, to, 0);

Parameters:
message - request massage to be sent to the remote communicator
to - remote communicator's URL
Returns:
response message

sendServiceRequest

Message[] sendServiceRequest(Message message)

sendServiceRequest

Message[] sendServiceRequest(Message message,
                             URL[] to,
                             long timeout)
                             throws TimeoutException
Sends a service request to another AALSpace Gateway Communicator listening at given URL, waits for the response and returns it if arrived before timing out.

Parameters:
message - request massage to be sent to the remote communicator
to - remote communicator's URL
timeout - time in milliseconds to wait for the response
Returns:
response message
Throws:
TimeoutException - when timed out

sendServiceRequest

Message[] sendServiceRequest(Message message,
                             long timeout)
                             throws TimeoutException
Throws:
TimeoutException

sendServiceRequestAsync

void sendServiceRequestAsync(Message message,
                             URL returnTo,
                             URL to,
                             ResponseCallback callback)
Sends a service request to another AALSpace Gateway Communicator listening at given URL, registers callback which will be notified once the response arrives.

Parameters:
message - request massage to be sent to the remote communicator
returnTo - local communicator's URL to send back the response to
to - remote communicator's URL
callback - callback which will be notified once the response arrives

sendContextEvent

void sendContextEvent(Message message,
                      URL[] to)
Sends a context event to other AALSpace Gateway Communicators listening at given URL.

Parameters:
message - context event to be sent
to - a list of URLs of remote communicators to which the event should be delivered

sendContextEvent

void sendContextEvent(Message message)

sendUIResponse

void sendUIResponse(Message message,
                    URL[] to)
Sends a ui response to other AALSpace Gateway Communicators listening at given URL.

Parameters:
message - ui response
to - a list of URLs of remote communicators to which the event should be delivered

sendUIResponse

void sendUIResponse(Message message)

sendUIRequest

void sendUIRequest(Message message,
                   URL[] to)
Sends a ui request to other AALSpace Gateway Communicators listening at given URL.

Parameters:
message - ui request
to - a list of URLs of remote communicators to which the event should be delivered

sendUIRequest

void sendUIRequest(Message message)

sendImportRequest

Message[] sendImportRequest(Message message,
                            URL[] to)

sendImportRequest

Message sendImportRequest(Message message)

sendImportRefresh

void sendImportRefresh(Message message,
                       URL[] to)

sendImportRefresh

void sendImportRefresh(Message message)

sendImportRemoval

void sendImportRemoval(Message message,
                       URL[] to)

sendImportRemoval

void sendImportRemoval(Message message)

handleMessage

void handleMessage(InputStream in,
                   OutputStream out)
                   throws Exception
Throws:
Exception

stop

void stop()

start

void start()
           throws Exception
Throws:
Exception


Copyright © 2014 universAAL Consortium. All Rights Reserved.