Jumpi v1.2.0

org.jumpi.impl.connector.loopback
Class LoopbackDestination

java.lang.Object
  |
  +--org.jumpi.impl.AbstractDestination
        |
        +--org.jumpi.impl.connector.loopback.LoopbackDestination
All Implemented Interfaces:
Destination, Destination

public class LoopbackDestination
extends AbstractDestination

Destination managed by the LoopbackConnector which is simply based on a String Url supporting wildcards. The syntax is <protocol>://<address> where protocol is the protocol supported by the LoopbackConnector, and address is any String or * which represents any address.


Field Summary
 
Fields inherited from class org.jumpi.impl.AbstractDestination
connector_, controller_, props_, url_, wildcard_
 
Fields inherited from interface org.jumpi.Destination
PROTOCOL_SEPARATOR, SEPARATOR
 
Constructor Summary
LoopbackDestination(java.lang.String url, Controller controller, Connector connector, boolean wildcard)
          Creates a new LoopbackDestination object.
 
Method Summary
 java.lang.String getUrl()
          Returns the normalized Url.
 boolean matches(Destination dest)
          Whether the instance matches the other Destination.
 
Methods inherited from class org.jumpi.impl.AbstractDestination
equals, getConnector, getController, getControllerName, getProperties, hashCode, isWildcard, setProperties
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoopbackDestination

public LoopbackDestination(java.lang.String url,
                           Controller controller,
                           Connector connector,
                           boolean wildcard)
Creates a new LoopbackDestination object.

Parameters:
url - the Url.
controller - the Controller instance managing the Connector.
connector - the Connector instance.
wildcard - whether the instance is a wildcard Destination.
Method Detail

getUrl

public java.lang.String getUrl()
Returns the normalized Url.

Specified by:
getUrl in interface Destination
Specified by:
getUrl in class AbstractDestination
Returns:
the normalized Url.

matches

public boolean matches(Destination dest)
Whether the instance matches the other Destination. Two Destinations match if their Url's are equal, or always if the instance is a wildcard Destination.

Specified by:
matches in interface Destination
Overrides:
matches in class AbstractDestination
Parameters:
dest - the other Destination.
Returns:
true if the instance matches the other Destination, else false.

Jumpi v1.2.0

Copyright 2003, Peter Jonathan Klauser.