org.gcube.common.core.faults
Class GCUBEFault

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.io.IOException
              extended by java.rmi.RemoteException
                  extended by org.apache.axis.AxisFault
                      extended by org.oasis.wsrf.faults.BaseFaultType
                          extended by org.gcube.common.core.faults.GCUBEFault
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
GCUBERetryEquivalentFault, GCUBERetrySameFault, GCUBEUnrecoverableFault

public class GCUBEFault
extends org.oasis.wsrf.faults.BaseFaultType
implements Serializable

Root of all remote faults with GCUBE semantics.

Author:
Fabio Simeoni (University of Strathclyde)
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.apache.axis.AxisFault
faultActor, faultCode, faultDetails, faultHeaders, faultNode, faultString, faultSubCode, log
 
Fields inherited from class java.rmi.RemoteException
detail
 
Constructor Summary
GCUBEFault()
          Creates a new instance.
GCUBEFault(Calendar timestamp, org.apache.axis.message.addressing.EndpointReferenceType originator, org.oasis.wsrf.faults.BaseFaultTypeErrorCode errorCode, org.oasis.wsrf.faults.BaseFaultTypeDescription[] description, org.oasis.wsrf.faults.BaseFaultType[] faultCause, String faultMessage, String faultType)
          Creates a new fault from various parameters.
GCUBEFault(String... msg)
          Creates an instance with an optional message.
GCUBEFault(Throwable e, String... msg)
          Creates an instance from a given cause and, optionally, a message.
 
Method Summary
 boolean equals(Object obj)
          
static org.apache.axis.encoding.Deserializer getDeserializer(String mechType, Class _javaType, QName _xmlType)
          Get Custom Deserializer
protected  GCUBEException getException(String msg, Throwable cause)
          Returns an exception corresponding to this fault type.
 String getFaultMessage()
          Returns the fault message.
 String getFaultType()
          Returns the fault type.
static org.apache.axis.encoding.Serializer getSerializer(String mechType, Class _javaType, QName _xmlType)
          Get a sustom Serializer
static org.apache.axis.description.TypeDesc getTypeDesc()
          Returns the type description
 int hashCode()
          
 Throwable remoteCause()
          Returns the remote cause of the fault as a Throwable
 void setFaultMessage(String faultMessage)
          Sets the fault message.
 void setFaultType(String faultType)
          Sets the fault type.
 GCUBEException toException()
          Converts the fault into a corresponding GCUBEException.
 void writeDetails(QName qname, org.apache.axis.encoding.SerializationContext context)
          
 
Methods inherited from class org.oasis.wsrf.faults.BaseFaultType
getDescription, getDescription, getErrorCode, getFaultCause, getFaultCause, getOriginator, getTimestamp, setDescription, setDescription, setErrorCode, setFaultCause, setFaultCause, setOriginator, setTimestamp
 
Methods inherited from class org.apache.axis.AxisFault
addFaultDetail, addFaultDetail, addFaultDetailString, addFaultSubCode, addFaultSubCodeAsString, addHeader, addHostname, addHostnameIfNeeded, clearFaultDetails, clearFaultSubCodes, clearHeaders, dump, dumpToString, getFaultActor, getFaultCode, getFaultDetails, getFaultNode, getFaultReason, getFaultRole, getFaultString, getFaultSubCodes, getHeaders, initFaultSubCodes, lookupFaultDetail, makeFault, output, printStackTrace, printStackTrace, removeFaultDetail, removeHostname, setFaultActor, setFaultCode, setFaultCode, setFaultCodeAsString, setFaultDetail, setFaultDetailString, setFaultNode, setFaultReason, setFaultRole, setFaultString, toString
 
Methods inherited from class java.rmi.RemoteException
getCause, getMessage
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getStackTrace, initCause, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GCUBEFault

public GCUBEFault()
Creates a new instance.


GCUBEFault

public GCUBEFault(Calendar timestamp,
                  org.apache.axis.message.addressing.EndpointReferenceType originator,
                  org.oasis.wsrf.faults.BaseFaultTypeErrorCode errorCode,
                  org.oasis.wsrf.faults.BaseFaultTypeDescription[] description,
                  org.oasis.wsrf.faults.BaseFaultType[] faultCause,
                  String faultMessage,
                  String faultType)
Creates a new fault from various parameters.

Parameters:
timestamp - the timestamp.
originator - the originat.
errorCode - the error code.
description - the description.
faultCause - the cause.
faultMessage - the message.
faultType - the type.

GCUBEFault

public GCUBEFault(Throwable e,
                  String... msg)
Creates an instance from a given cause and, optionally, a message.

Parameters:
e - the cause
msg - (optional) message.

GCUBEFault

public GCUBEFault(String... msg)
Creates an instance with an optional message.

Parameters:
msg - (optional) the message.
Method Detail

getFaultMessage

public String getFaultMessage()
Returns the fault message.

Returns:
faultMessage the message.

setFaultMessage

public void setFaultMessage(String faultMessage)
Sets the fault message.

Parameters:
faultMessage - the message.

getFaultType

public String getFaultType()
Returns the fault type.

Returns:
faultType the type.

setFaultType

public void setFaultType(String faultType)
Sets the fault type.

Parameters:
faultType - the type.

equals

public boolean equals(Object obj)

Overrides:
equals in class org.oasis.wsrf.faults.BaseFaultType

hashCode

public int hashCode()

Overrides:
hashCode in class org.oasis.wsrf.faults.BaseFaultType

getTypeDesc

public static org.apache.axis.description.TypeDesc getTypeDesc()
Returns the type description

Returns:
the description

getSerializer

public static org.apache.axis.encoding.Serializer getSerializer(String mechType,
                                                                Class _javaType,
                                                                QName _xmlType)
Get a sustom Serializer


getDeserializer

public static org.apache.axis.encoding.Deserializer getDeserializer(String mechType,
                                                                    Class _javaType,
                                                                    QName _xmlType)
Get Custom Deserializer


writeDetails

public void writeDetails(QName qname,
                         org.apache.axis.encoding.SerializationContext context)
                  throws IOException

Overrides:
writeDetails in class org.oasis.wsrf.faults.BaseFaultType
Throws:
IOException

remoteCause

public Throwable remoteCause()
Returns the remote cause of the fault as a Throwable

Returns:
the remote cause as a Throwable
See Also:
FaultUtils.remoteCause(GCUBEFault)

toException

public GCUBEException toException()
Converts the fault into a corresponding GCUBEException.

Returns:
the exception.

getException

protected GCUBEException getException(String msg,
                                      Throwable cause)
Returns an exception corresponding to this fault type.

Parameters:
msg - the message of the exception.
Returns:
the exception.


Copyright © 2012. All Rights Reserved.