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 FormModifier 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, getProviderInfo
public 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)
DOFException
getErrorCodeString
in class DOFException
errorCode
- 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 DOFException
public java.lang.String getMessage()
getMessage
in class DOFException
public void marshal(DOFMarshalContext context, java.lang.Object state, DOFPacket p) throws DOFMarshalException
DOFException
marshal
in interface org.opendof.core.internal.protocol.Marshallable
marshal
in class DOFException
context
- 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.