| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.odata4j.exceptions.ODataProducerExceptions
public class ODataProducerExceptions
A static factory to create ODataProducerException instances.
 
This factory is used after deserialization of error responses retrieved from an OData producer; it returns one of the following exceptions based on the HTTP status of the response:
BadRequestException,ForbiddenException,MethodNotAllowedException,NotAcceptableException,NotAuthorizedException,NotFoundException,NotImplementedException,ServerErrorException,UnsupportedMediaTypeException
| Method Summary | |
|---|---|
| static void | add(ExceptionFactory<?> exceptionFactory)Adds an ExceptionFactoryand thus makes the created exception available (and catchable) for OData consumers. | 
| static ODataProducerException | create(Response.StatusType status,
       OError error)Creates a new ODataProducerException. | 
| static void | restore()Restores this factory to its initial state. | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Method Detail | 
|---|
public static void add(ExceptionFactory<?> exceptionFactory)
ExceptionFactory and thus makes the created exception available (and catchable) for OData consumers.
exceptionFactory - the exception factory to add
public static ODataProducerException create(Response.StatusType status,
                                            OError error)
ODataProducerException.
status - the HTTP status received in conjunction with this errorerror - the OData error message returned by the producer
ODataProducerExceptionpublic static void restore()
| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||