Jumpi v1.2.0

org.jumpi.spi
Interface Destination

All Superinterfaces:
Destination
All Known Implementing Classes:
AbstractDestination

public interface Destination
extends Destination

The Destination is a generic addressing mechanism for sending and receiving messages.

The service provider Destination interface extensions provide a Jumpi implementation with additional internal data in excess of that provided to a Jumpi client application. A Jumpi client application is shielded from unnecessary interface complexity through this two level inheritance heirarchy.

When a Jumpi client application retrieves a Destination from Jumpi.getDestination(java.lang.String, java.lang.String, java.util.Hashtable), the implementation has the opportunity to link the returned Destination with the Controller which is responsible for the sending and receiving messages for the Destination. This linking is done by the reference implementation of the Jumpi to delegate Jumpi client application calls directly to the responsible Controller. The Controller may furthermore optionally link the Destination with a particular Connector which is responsible for low level sending and receiving operations. When, how and if a Connector is linked is dependent on the Controller implementation.


Field Summary
 
Fields inherited from interface org.jumpi.Destination
PROTOCOL_SEPARATOR, SEPARATOR
 
Method Summary
 Connector getConnector()
          Return a reference to the Connector responsible for low level messaging operations for this Destination, if available.
 Controller getController()
          Return a reference to the Controller responsible for messaging operations for this Destination, if available.
 boolean isWildcard()
           Whether the Destination instance represents a set of individual Destinations.
 boolean matches(Destination dest)
          Whether this instance which is a wildcard Destination matches with the given Destination.
 
Methods inherited from interface org.jumpi.Destination
getControllerName, getProperties, getUrl
 

Method Detail

getController

public Controller getController()
Return a reference to the Controller responsible for messaging operations for this Destination, if available. Must be available if sends or receives are to be performed via org.jumpi.spi.component.Jumpi implementations.

Returns:
the Controller for this Destination, or null if not known or not bound.

getConnector

public Connector getConnector()
Return a reference to the Connector responsible for low level messaging operations for this Destination, if available. If not available, then Controllers must know how to map send and receive operations to available Connectors without relying on storing the information in the individual Destinations.

Returns:
the Controller for this Destination, or null if not known or not bound.

isWildcard

public boolean isWildcard()

Whether the Destination instance represents a set of individual Destinations. Wildcard Destinations may match more than one unique destination.

The matches(org.jumpi.spi.Destination) method is used to determine if this wildcard Destination instance matches a non wildcard destination. Wildcard destinations are never matched against themselves.

Destination equality is determined through the equals method of a Destination Url Destination.getUrl(). This is possible since the Destination Url's are normalized.

Returns:
true if this instance is a wildcard Destination.

matches

public boolean matches(Destination dest)
Whether this instance which is a wildcard Destination matches with the given Destination. Used to check whether incoming data from a specific Destination can match a wildcard receive operation.

Parameters:
dest - a non wildcard Destination to check if it matches this instance.
Returns:
true if this instance matches the given instance, otherwise false.
See Also:
isWildcard()

Jumpi v1.2.0

Copyright © 2003, Peter Jonathan Klauser.