|
Jumpi v1.2.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.jumpi.impl.AbstractDestination
General implementation of a generic Destination based on a simple String Url.
Field Summary | |
protected Connector |
connector_
The Connector associated with the Destination. |
protected Controller |
controller_
The Controller associated with the Destination. |
protected java.util.Hashtable |
props_
Internal properties associated with the Destination. |
protected java.lang.String |
url_
The Destination's Url. |
protected boolean |
wildcard_
Whether the Destination is a wildcard Destination. |
Fields inherited from interface org.jumpi.Destination |
PROTOCOL_SEPARATOR, SEPARATOR |
Constructor Summary | |
AbstractDestination(java.lang.String url)
Creates a new AbstractDestination object. |
|
AbstractDestination(java.lang.String url,
Controller controller,
Connector connector,
boolean wildcard)
Creates a new AbstractDestination object. |
Method Summary | |
boolean |
equals(java.lang.Object o)
Whether the Destination's Urls are equal. |
Connector |
getConnector()
Return the Connector associated with the Destination. |
Controller |
getController()
Return the Controller associated with the Destination. |
java.lang.String |
getControllerName()
Return the fully qualified name of the Controller associated with the Destination. |
java.util.Hashtable |
getProperties()
Return the internal properties associated with the Destination. |
abstract java.lang.String |
getUrl()
Return the Destination's Url. |
int |
hashCode()
The hashcode of the Destination's Url, since the equality function is based on the Url. |
boolean |
isWildcard()
Whether the Destination instance represents a set of individual Destinations. |
boolean |
matches(Destination dest)
Default implementation matches a wildcard Destination with any other specific Destination. |
void |
setProperties(java.util.Hashtable props)
Set the internal properties associated with the Destination. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.lang.String url_
protected java.util.Hashtable props_
protected Controller controller_
protected Connector connector_
protected boolean wildcard_
Constructor Detail |
public AbstractDestination(java.lang.String url)
url
- the Url.public AbstractDestination(java.lang.String url, Controller controller, Connector connector, boolean wildcard)
url
- the Url.controller
- the Controller.connector
- the Connector.wildcard
- whether the Destination is a wildcard Destination.
java.lang.IllegalArgumentException
- if url is null.Method Detail |
public java.lang.String getControllerName()
getControllerName
in interface Destination
public abstract java.lang.String getUrl()
getUrl
in interface Destination
public java.util.Hashtable getProperties()
getProperties
in interface Destination
setProperties(java.util.Hashtable)
public void setProperties(java.util.Hashtable props)
props
- the internal properties associated with the Destination.
May be null.getProperties()
public Controller getController()
getController
in interface Destination
public Connector getConnector()
getConnector
in interface Destination
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.
isWildcard
in interface Destination
public boolean matches(Destination dest)
matches
in interface Destination
dest
- the other Destination.
Destination.isWildcard()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
o
- the other object.
public int hashCode()
hashCode
in class java.lang.Object
|
Jumpi v1.2.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |