|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectat.spardat.xma.boot.transport.XMA_URI
custom URI class for xma usage. This abstraction of URI brings the capability to
use the same URI even for different implementations of Transport.
At this time only a mapping to HTTP-URLs is implemented but additional protocols
may be added in the future.
The URIs used by XMA contain of the following parts:
<protocol>://<server>[_<environment>][_<installation>][:<port>]/<application>[/<component>][/<resource>][&<parameters>]
http is supported.
| Constructor Summary | |
XMA_URI(java.lang.String uri)
Constructs a XMA_URI from a string. |
|
XMA_URI(java.net.URL url)
Constructs a XMA_URI from a java.net.URL. |
|
XMA_URI(XMA_URI uri)
Copy-constructor. |
|
| Method Summary | |
void |
addParameter(java.lang.String key,
java.lang.String value)
Adds a parameter to the parameters of the query string of the url. |
java.lang.String |
getApplication()
Get the application part of the URI. |
XMA_URI |
getApplicationURI()
Get copy of this URI that contains only an base URI to the application root. |
java.lang.String |
getComponent()
Get the component part of the URI |
static java.lang.String |
getDEFAULT_PROTOCOL()
Get the default protocol used by the transport layer. |
java.lang.String |
getEnvironment()
Get the environment part of the URI |
java.net.URL |
getHTTP_AppUri(java.lang.String context)
Gets a HTTP-URL to a resource relative to the application specified by this XMA_URI. |
java.net.URL |
getHTTP_URI()
Converts this XMA_URI to a java.net.URL using the http-protocol. |
java.lang.String |
getInstallation()
Get the installation part of the URI |
int |
getPort_()
Get the port specified in the URI |
java.lang.String |
getProtocol_()
Get the protocol of the URI |
java.lang.String |
getResource()
Get the resource part of the URI |
java.lang.String |
getServer()
Get the server part of the URI |
void |
setComponent(java.lang.String component)
Set the component part of the URI. |
void |
setPort(int port)
Set the port for the URI |
static void |
setProperties(java.util.Properties pnew)
Set configuration properties. |
void |
setProtocol(java.lang.String protocol)
Sets the protocl of the URI. |
void |
setResource(java.lang.String resource)
Set the resource part of the URI |
java.lang.String |
toString()
Get a String representation of this XMA_URI. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public XMA_URI(java.net.URL url)
throws java.net.MalformedURLException
The java.net.URL may contain escaped characters.
This characters are unescaped automatically.
Additional slashes inbetween or at the end of an url are removed.
e.g. http://server/app//comp -> http://server/app/comp
e.g. http://server/app/ -> http://server/app
Additional '&' in query strings are removed.
e.g. http://server/app?&name=sepp&&a=b& -> http://server/app?name=sepp&a=b
url - the URL to parse the information from.
java.net.MalformedURLException -
public XMA_URI(java.lang.String uri)
throws java.net.MalformedURLException
XMA_URI(java.net.URL) ot parse its information from the given string.
uri - the string to parse the information from.
java.net.MalformedURLException - pased throu from java.net.URL and XMA_URI(java.net.URL).public XMA_URI(XMA_URI uri)
uri - to copy its data from.| Method Detail |
public static void setProperties(java.util.Properties pnew)
public XMA_URI getApplicationURI()
http://host/application
public void addParameter(java.lang.String key,
java.lang.String value)
key - the name of the parametervalue - the value of the parameterpublic java.net.URL getHTTP_URI()
java.net.URL using the http-protocol.
public java.lang.String toString()
public java.net.URL getHTTP_AppUri(java.lang.String context)
public static java.lang.String getDEFAULT_PROTOCOL()
public java.lang.String getApplication()
public java.lang.String getComponent()
public java.lang.String getEnvironment()
public java.lang.String getInstallation()
public int getPort_()
public void setPort(int port)
port - the port to usepublic java.lang.String getProtocol_()
public void setProtocol(java.lang.String protocol)
protocol - the protocol to use in this URIpublic java.lang.String getResource()
public java.lang.String getServer()
public void setComponent(java.lang.String component)
component - the component name relative to this URI.
public void setResource(java.lang.String resource)
resource - relative to this URI.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||