com.neeve.util
Class UtlDescriptor

java.lang.Object
  extended by com.neeve.util.UtlDescriptor
Direct Known Subclasses:
UtlAddressDescriptor, UtlPropsDescriptor

public class UtlDescriptor
extends Object

Utility class representing a generic Neeve descriptor.

This class is a utility class to represent a generic Neeve descriptor. A descriptor is of the form [type]://[config]. Descriptors are used to identify and configure many resources in the system e.g. links, packets These resource descriptors share this format and further refine the structure of the descriptor by defining the format of the config portion of the descriptor.

This class MAY be used by end users, however it is not supported.


Field Summary
 String config
          The config portion parsed from the descriptor string
static String SEPARATOR_STR
          String that separates the type string from the config string
 String type
          The type portion parsed from the descriptor string
 
Method Summary
 void appendTo(Appendable appendable)
          Appends the descriptor string to the given Appendable.
static UtlDescriptor parse(CharSequence descriptor)
          Parses a descriptor string into its components
 String toString()
          Return a string representation of the object
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

type

public final String type
The type portion parsed from the descriptor string


config

public final String config
The config portion parsed from the descriptor string


SEPARATOR_STR

public static final String SEPARATOR_STR
String that separates the type string from the config string

See Also:
Constant Field Values
Method Detail

toString

public final String toString()
Return a string representation of the object

Overrides:
toString in class Object
Threading:
This method is safe for concurrent access by multiple threads

appendTo

public final void appendTo(Appendable appendable)
Appends the descriptor string to the given Appendable.

Parameters:
appendable - The Appendable to which to append.
Throws:
RuntimeException - if the appendable throws an IOException

parse

public static UtlDescriptor parse(CharSequence descriptor)
                           throws IllegalArgumentException
Parses a descriptor string into its components

Parameters:
descriptor - The descriptor string
Throws:
IllegalArgumentException - Thrown in case the descriptor string is not of the format


Copyright © 2016 Neeve Research, LLC. All Rights Reserved.