|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.muse.ws.addressing.EndpointReference
public class EndpointReference
EndpointReference is a complete implementation of the EndpointReferenceType
type defined in WS-Addressing 1.0.
This class is implemented as a wrapper for an XML representation of an EPR,
providing methods that allow users to get and set values with regular Java
types rather than DOM types. It also provides a number of copy and conversion
constructors for creating EPRs from various sources.
Constructor Summary | |
---|---|
EndpointReference(Element root)
This is a convenience constructor that creates a new EPR from the given XML, making a deep copy of it in the process. |
|
EndpointReference(Element root,
boolean makeDeepCopyOfXML)
Creates a new EPR from the given XML definition. |
|
EndpointReference(EndpointReference copy)
This is a convenience constructor that is equivalent to calling the EndpointReference(EndpointReference, QName) constructor with the standard wsa:EndpointReference QName. |
|
EndpointReference(EndpointReference copy,
QName typeName)
A copy constructor for EPRs - creates a deep copy of the given EPR. |
|
EndpointReference(URI address)
This is a convenience constructor that is the equivalent of calling EndpointReference(URI, QName) constructor with the standard wsa:EndpointReference QName. |
|
EndpointReference(URI address,
QName typeName)
Creates a new EPR with the given wsa:Address URI; when the EPR is serialized to XML, its root element will have the given QName. |
Method Summary | |
---|---|
void |
addParameter(Element parameter)
Adds the given Element to the collection of reference parameters. |
void |
addParameter(QName qname)
This is a convenience method that calls addParameter(QName, Object) with a null parameter value. |
void |
addParameter(QName qname,
Object value)
Creates a new reference parameter with the given name and value. |
boolean |
equals(Object obj)
|
URI |
getAddress()
|
int |
getNumberOfParameters()
|
Element |
getParameter(QName qname)
|
Element |
getParameter(QName qname,
int index)
|
Element[] |
getParameters()
|
Element[] |
getParameters(QName qname)
|
String |
getParameterString(QName qname)
|
String |
getParameterString(QName qname,
int index)
|
QName |
getRootTypeName()
|
int |
hashCode()
This method has been properly overridden to account for the change to equals(Object). |
void |
removeParameter(QName qname)
This is a convenience method that removes the first instance of a reference parameter with the given name. |
void |
removeParameter(QName qname,
int index)
Removes the n-th instance of the parameter with the given name. |
void |
removeParameters(QName qname)
Removes all instances of the parameter with the given name. |
void |
setAddress(URI address)
|
String |
toString()
|
Element |
toXML()
Converts this object into an XML representation, as defined by its related schema or specification. |
Element |
toXML(Document doc)
Converts this object into an XML representation, as defined by its related schema or specification. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public EndpointReference(Element root) throws SoapFault
SoapFault
EndpointReference(Element, boolean)
public EndpointReference(Element root, boolean makeDeepCopyOfXML) throws SoapFault
root
- The XML definition of the EPR.makeDeepCopyOfXML
- True if you want the class to clone the given XML fragment
so that it has an independent copy of the data. If a copy of
the given XML is made, it will retain the same root element
QName.
SoapFault
- public EndpointReference(EndpointReference copy)
EndpointReference(EndpointReference, QName)
,
WsaConstants.EPR_QNAME
public EndpointReference(EndpointReference copy, QName typeName)
copy
- The EPR to copy (deep copy).typeName
- The QName of the root element when this EPR is serialized to XML.public EndpointReference(URI address)
EndpointReference(URI, QName)
,
WsaConstants.EPR_QNAME
public EndpointReference(URI address, QName typeName)
address
- The wsa:Address of the EPR.typeName
- The QName of the root element when the EPR is serialized to XML.Method Detail |
---|
public void addParameter(Element parameter)
parameter
- public void addParameter(QName qname)
addParameter(QName, Object)
public void addParameter(QName qname, Object value)
qname
- The name of the reference parameter's XML element.value
- The parameter value (can be null).public boolean equals(Object obj)
equals
in class Object
public URI getAddress()
public int getNumberOfParameters()
public Element getParameter(QName qname)
qname
- The name of the reference parameter to look up.
public Element getParameter(QName qname, int index)
qname
- The name of the reference parameter to look up.
public Element[] getParameters()
public Element[] getParameters(QName qname)
public String getParameterString(QName qname)
qname
- The name of the reference parameter to look up.
public String getParameterString(QName qname, int index)
qname
- The name of the reference parameter to look up.
public QName getRootTypeName()
public int hashCode()
hashCode
in class Object
public void removeParameter(QName qname)
removeParameter(QName, int)
public void removeParameter(QName qname, int index)
qname
- The name of the parameter instance to delete.index
- The instance of the parameter to delete.public void removeParameters(QName qname)
qname
- The name of the parameter(s) to delete.public void setAddress(URI address)
address
- The wsa:Address of the EPR (cannot be null).public String toString()
toString
in class Object
public Element toXML()
XmlSerializable
toXML
in interface XmlSerializable
toXML(Document)
public Element toXML(Document doc)
XmlSerializable
toXML
in interface XmlSerializable
doc
- The DOM Document that will be used to create all of the nodes
in the resulting XML fragment.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |