org.sblim.wbem.cim
public class CIMNameSpace extends java.lang.Object implements java.io.Serializable, java.lang.Cloneable
| Modifier and Type | Field and Description |
|---|---|
static char |
NAMESPACE_SEPARATOR |
| Constructor and Description |
|---|
CIMNameSpace()
Constructs and instantiates a default CIM namespace name.
|
CIMNameSpace(java.lang.String pURI)
Constructs a CIM namespace, pointing to a specified host or URI
(protocol://hostname[:port]/file), i.e.
|
CIMNameSpace(java.lang.String pHost,
java.lang.String pNamespace)
Constructs an object which represents a CIMNameSpace.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
clone() |
boolean |
equals(java.lang.Object o) |
java.lang.String |
getHost()
Returns the hostname of the CIMNameSpace
|
java.net.URI |
getHostURI()
Returns the URI representation of the CIMNameSpace.
|
java.net.URL |
getHostURL()
Returns the URL representation of the CIMNameSpace.
|
java.lang.String |
getNameSpace()
Returns the namespace fragment of the CIMNameSpace.
|
int |
getPort()
Returns the port defined for this namespace by the URI.
|
java.lang.String |
getScheme()
Returns the scheme specified on the URI.
|
int |
hashCode() |
static CIMNameSpace |
parse(java.lang.String pURI)
Deprecated.
The CIMNameSpace(String) constructor must be used instead of
this method.
|
void |
setHost(java.lang.String pHost)
Specifies the host for this CIMNameSpace object.
|
void |
setNameSpace(java.lang.String pNamespace)
Specifies the namespace for this CIMNameSpace object.
|
void |
setPort(int pPort)
Specifies the port for this CIMNameSpace object.
|
java.lang.String |
toString() |
public static final char NAMESPACE_SEPARATOR
public CIMNameSpace()
throws CIMException
CIMException - CIM_ERR_FAILED - if a malformed URL is constructed from the
specified parameterspublic CIMNameSpace(java.lang.String pURI)
throws CIMException
pURI - The URI StringCIMExceptionpublic CIMNameSpace(java.lang.String pHost,
java.lang.String pNamespace)
throws CIMException
pHost - host= protocol://hostname[:port]/file host=
"https://myhostname/" host= "http://myhostname:5988/cimom"
host= "myhostname"pNamespace - a string which represents the namespace in the CIM Object
Manager. According to the spec it should not starts or ends
with '/'. This are examples of valid namespace. namespace=
"root/cimv2" namespace= "root"java.lang.IllegalArgumentException - if theCIMException - CIM_ERR_INVALID_PARAMETER - if the URI is malformedpublic java.lang.Object clone()
clone in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic java.lang.String getHost()
public java.net.URI getHostURI()
throws CIMException
CIMException - malformed URI exceptionpublic java.net.URL getHostURL()
throws CIMException
CIMException - malformed URL exceptionURI.toURL()public java.lang.String getNameSpace()
public java.lang.String getScheme()
public int hashCode()
hashCode in class java.lang.Objectpublic static CIMNameSpace parse(java.lang.String pURI) throws CIMException
pURI - The URI stringCIMExceptionpublic void setPort(int pPort)
pPort - public int getPort()
public void setHost(java.lang.String pHost)
pHost - public void setNameSpace(java.lang.String pNamespace)
throws CIMException
pNamespace - The namespaceCIMExceptionpublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2005, 2009 IBM Corporation. All Rights Reserved.