|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.neeve.util.UtlDescriptor
com.neeve.util.UtlAddressDescriptor
public final class UtlAddressDescriptor
Utility class representing a Neeve address descriptor.
This class is a utility class to represent a Neeve address descriptor. Such
descriptors are specialized descriptors (see UtlDescriptor
) of
the form [type]://[address]&prop=name&prop=name&...&prop=name where
address specifies the type specific address of the link endpoint and
each prop=name name value pair specifies a property value .
This class MAY be used by end users, however it is not supported.
Field Summary | |
---|---|
String |
address
The address portion parsed from the config string |
HashMap<String,Object> |
props
The set of properties parsed from the config string. |
Fields inherited from class com.neeve.util.UtlDescriptor |
---|
config, SEPARATOR_STR, type |
Method Summary | |
---|---|
void |
appendFullStringTo(Appendable appendable)
Appends the descriptor string to the given Appendable . |
void |
appendShortStringTo(Appendable appendable)
Appends the descriptor string to the given Appendable . |
UtlAddressDescriptor |
copy()
Creates a copy of this UtlAddressDescriptor. |
boolean |
equals(Object o)
Compares the specified object with this object for equality |
UtlAddressDescriptor |
getConnectorDescriptor()
Get a descriptor's connector descriptor. |
int |
hashCode(Object o)
Returns an address descriptor's hash code. |
static boolean |
isValid(CharSequence descriptor)
Validate if a descriptor string is syntactically correct. |
static UtlAddressDescriptor |
parse(String descriptor,
HashMap<String,Object> props)
Parse an address descriptor into its components. |
void |
setConnectorDescriptor(UtlAddressDescriptor connectorDescriptor)
Set a descriptor's connector descriptor. |
String |
toFullString()
Get the address descriptor as a string of the format prot://addr&prop1=val1...propn-=valn |
String |
toShortString()
Get the address descriptor as a string of the format prot://addr i.e. |
Methods inherited from class com.neeve.util.UtlDescriptor |
---|
appendTo, parse, toString |
Methods inherited from class java.lang.Object |
---|
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public final String address
public final HashMap<String,Object> props
Method Detail |
---|
public static UtlAddressDescriptor parse(String descriptor, HashMap<String,Object> props) throws IllegalArgumentException
descriptor
- The address descriptor.props
- The properties table to use as the starting point for
setting properties parsed from the config string. This value can be
null in which case a new properties table is created to store parsed
properties.
IllegalArgumentException
- Thrown in case the descriptor string
is not of the form [type]://[address]&prop=name&prop=name&...
This method parses an address descriptor. Upon return, the provided properties table is updated with the configuration properties parsed from the descriptor string.
public static boolean isValid(CharSequence descriptor)
descriptor
- The address descriptor.
public final boolean equals(Object o)
equals
in class Object
public final int hashCode(Object o)
public final void setConnectorDescriptor(UtlAddressDescriptor connectorDescriptor)
This method pertains only to server address descriptors. It is for use by server link endpoints to set a descriptor that can be used to connect to the server endpoint configured using a server address descriptor. The connector descriptor can then be communicated to the client side to connect to the server endpoint.
public final UtlAddressDescriptor getConnectorDescriptor()
This method pertains only to server address descriptors. It returns the
descriptor set by setConnectorDescriptor(com.neeve.util.UtlAddressDescriptor)
i.e. the descriptor
that can be used to connect to a server endpoint listening on an address
in a server address descriptor.
This method does not pertain to client side address descriptors and will return null.
public final String toShortString()
public final void appendShortStringTo(Appendable appendable)
Appendable
.
appendable
- The Appendable
to which to append.
RuntimeException
- if the appendable throws an IOException
public final String toFullString()
public final void appendFullStringTo(Appendable appendable)
Appendable
.
appendable
- The Appendable
to which to append.
RuntimeException
- if the appendable throws an IOException
public final UtlAddressDescriptor copy()
props
and connectorDescriptor
are also copied.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |