Package org.ws4d.java.dispatch

Implements various tools for the handling of messages between local/remote devices and clients.

See:
          Description

Interface Summary
MessageListener Implementations of this interface can register within MessageInformer to receive notifications about inbound and outbound messages running through a DPWS framework instance.
MessageSelector A MessageSlector's purpose is to decide whether a MessageListener shall be informed about a given message or not.
ServiceReferenceInternal Interface covers the methods used internally to manage service references.
 

Class Summary
AllMessageSelector Simple message selector implementation, which matches every message regardless of its concrete type or other message properties.
DefaultDeviceReference Class holds listeners of device reference.
DefaultMessageSelector This class allows matching messages according to their message type or the address of the endpoint they are addressed to.
DefaultServiceReference Class holds service reference.
DefaultServiceReferenceCallback  
HelloData Data associated with a received hello message.
MessageInformer This class is the place to register listeners for messages crossing the DPWS framework.
OutDispatcher  
ServiceReferenceEventRegistry Registry to manage all listeners to service changes, who implement the ServiceListener interface.
ServiceReferenceFactory  
 

Exception Summary
DuplicateServiceReferenceException  
MissingMetadataException  
 

Package org.ws4d.java.dispatch Description

Implements various tools for the handling of messages between local/remote devices and clients.

This package contains three classes MessageInformer,MessageListener and an interfaceMessageSelector. The default implementation of the message selector DefaultMessageSelector is as follows: the message selector looks for messages of a certain type or messages matching a number of properties, each with a list of values attached. For the message to be selected, it must be an exact match. That is, a message will be selected if and only if it has matching values for all the given properties. All messages containing at least one value for this property will be considered. The AllMessageSelector implementation on the other hand declares every incoming message to be a match. Whilst the DefaultMessageSelector acts as a filter, AllMessageSelector simply selects all messages.

MessageSelectors are used to create new MessageListeners. That is, they enable a listener to register their interest in a specific type, or group of messages. A MessageListener instance is called each time an incoming message is received. These must be registered within a MessageInformer instance. This enables clients to receive notifications notified about every, or a selected type of messages sent through the framework.

The package further contains classes defining DeviceReferenceHandlers upon registration of a new device (local or remote), creating a proxy in case of a remove device, and ServiceReferenceHandlers, holding the service references of both local and proxy services. Both provide initialisation, updates, removal and probing methods.

DeviceServiceRegistry implements a Registry class through which service and device listeners can be registered, with which Device/Service references can be obtained from either their endpoint reference or their HelloData (data associated with a received Hello message). An HelloData instance will contain the following information