public final class DOFProviderException extends DOFException implements DOFImmutable
DOFInterface.Exception,
DOFObject,
DOFObject.Provider.get(org.opendof.core.oal.DOFOperation.Provide, org.opendof.core.oal.DOFRequest.Get, org.opendof.core.oal.DOFInterface.Property),
DOFObject.Provider.set(org.opendof.core.oal.DOFOperation.Provide, org.opendof.core.oal.DOFRequest.Set, org.opendof.core.oal.DOFInterface.Property, org.opendof.core.oal.DOFValue),
DOFObject.Provider.invoke(org.opendof.core.oal.DOFOperation.Provide, org.opendof.core.oal.DOFRequest.Invoke, org.opendof.core.oal.DOFInterface.Method, java.util.List<org.opendof.core.oal.DOFValue>),
Serialized Form| Modifier and Type | Field and Description |
|---|---|
static int |
INTERFACE_DEFINED
Error code for interface defined exceptions, also called "Provider Exceptions".
|
FAILED| Constructor and Description |
|---|
DOFProviderException(DOFInterface.Exception exception,
DOFValue... parameters)
Construct a DOFProviderException from a DOFInterface.Exception and its parameters.
|
DOFProviderException(DOFInterface.Exception exception,
java.util.List<DOFValue> parameters)
Construct a DOFProviderException from a DOFInterface.Exception and its parameters.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getErrorCodeString(int errorCode)
Get a String representation of an error code.
|
DOFInterface.Exception |
getInterfaceException()
Get the DOFInterface.Exception associated with this exception.
|
java.lang.String |
getMessage()
Gets a message that describes the conditions of this exception.
|
java.util.List<DOFValue> |
getParameters()
Get the parameters for this DOFProviderException.
|
void |
marshal(DOFMarshalContext context,
java.lang.Object state,
DOFPacket p)
Write an object to a serialized form to the specified buffer, according
to the context specified and with the given state.
|
java.lang.String |
toString()
Get a string representation of this object.
|
create, getErrorCode, getProviderInfopublic static final int INTERFACE_DEFINED
public DOFProviderException(DOFInterface.Exception exception, java.util.List<DOFValue> parameters)
exception - The exception as defined by a correlating interface definition. Must not be null.parameters - The parameter list for the exception if defined. Null = no parameters.public DOFProviderException(DOFInterface.Exception exception, DOFValue... parameters)
exception - The exception as defined by a correlating interface definition. Must not be null.parameters - The parameters for the exception if defined. May be omitted if no parameters are desired.public java.lang.String getErrorCodeString(int errorCode)
DOFExceptiongetErrorCodeString in class DOFExceptionerrorCode - The error code to convert to a String.public java.util.List<DOFValue> getParameters()
public DOFInterface.Exception getInterfaceException()
public java.lang.String toString()
toString in class DOFExceptionpublic java.lang.String getMessage()
getMessage in class DOFExceptionpublic void marshal(DOFMarshalContext context, java.lang.Object state, DOFPacket p) throws DOFMarshalException
DOFExceptionmarshal in interface org.opendof.core.internal.protocol.Marshallablemarshal in class DOFExceptioncontext - The context of the marshaling to be performed.state - The state in which the marshalling is done. This may affect the result.
For this class, the state is a providerID (DOFObjectID).p - The buffer which will receive the marshaled data. Must not be null.DOFMarshalException - If there are errors in the data or the buffer.