|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.flat502.rox.marshal.xmlrpc.XmlRpcMethod com.flat502.rox.marshal.xmlrpc.XmlRpcMethodResponse com.flat502.rox.marshal.xmlrpc.XmlRpcMethodFault
public class XmlRpcMethodFault
An instance of this class represents an XML-RPC method call fault.
The relationship between Java and XML-RPC data types is
discussed in the description of the
XmlRpcMethod
class.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface com.flat502.rox.marshal.xmlrpc.XmlRpcConstants |
---|
XmlRpcConstants.ContentTypes, XmlRpcConstants.Formats, XmlRpcConstants.Tags, XmlRpcConstants.Types |
Constructor Summary | |
---|---|
XmlRpcMethodFault(int faultCode,
java.lang.String faultString)
|
|
XmlRpcMethodFault(int faultCode,
java.lang.Throwable fault)
|
|
XmlRpcMethodFault(java.lang.Throwable fault)
|
Method Summary | |
---|---|
int |
getFaultCode()
Get the fault code for this RPC fault. |
java.lang.String |
getFaultString()
Get the fault string describing the fault code and the fault in more detail. |
protected void |
marshalImpl(XmlPrinter out)
The central hook for marshalling for sub-classes. |
protected Fault |
newFault(int faultCode,
java.lang.String faultString)
Constructs a new instance of Fault initialized
with the given fault code and fault string. |
protected java.lang.String |
toFaultString(java.lang.Throwable exception)
Converts an exception into a String value for use as a fault string |
Methods inherited from class com.flat502.rox.marshal.xmlrpc.XmlRpcMethodResponse |
---|
getReturnValue |
Methods inherited from class com.flat502.rox.marshal.xmlrpc.XmlRpcMethod |
---|
getContentType, getHttpMethod, getHttpURI, marshal, marshal, marshal, marshal, marshalValue, setCompactXml |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.flat502.rox.marshal.RpcResponse |
---|
getReturnValue |
Methods inherited from interface com.flat502.rox.marshal.RpcMethod |
---|
getContentType, marshal |
Constructor Detail |
---|
public XmlRpcMethodFault(java.lang.Throwable fault)
public XmlRpcMethodFault(int faultCode, java.lang.Throwable fault)
public XmlRpcMethodFault(int faultCode, java.lang.String faultString)
Method Detail |
---|
protected void marshalImpl(XmlPrinter out) throws MarshallingException, java.io.IOException
XmlRpcMethod
Implementations should write their marshalled form to the given stream which has already been initialized with an appropriate encoding.
marshalImpl
in class XmlRpcMethodResponse
out
- The stream implementations should marshal themselves to.
MarshallingException
- Implementations may raise an exception if a problem occurs
while marshalling is being attempted.
java.io.IOException
- Implementations may raise an exception if a problem occurs
while writing the marshalled form of this instance out.public java.lang.String getFaultString()
RpcFault
Fault strings are implementation-dependent. In general fault codes should be used for programmatic handling of faults and fault strings for display only.
getFaultString
in interface RpcFault
public int getFaultCode()
RpcFault
Fault codes are implementation-dependent.
getFaultCode
in interface RpcFault
protected java.lang.String toFaultString(java.lang.Throwable exception)
This method exists so that sub-classes can customize how the fault string is derived from an exception.
exception
- The exception to convert.
protected Fault newFault(int faultCode, java.lang.String faultString)
Fault
initialized
with the given fault code and fault string.
This factory method is exposed so that implementations
can return a sub-class of Fault
that may be
more useful in their context.
faultCode
- The fault code to initialize the instance with.faultString
- The fault string to initialize the instance with.
Fault
(or a sub-class)
suitably initialized.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |