|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codegist.crest.DefaultCRest
public class DefaultCRest
Default CRest implementation based on CRestContext
interface data model.
On top of the behavior described in CRest
, this implementation adds :
- RequestInterceptor
to intercept any requests before it gets fired.
- Serializer
to customize the serialization process of any types.
- Injector
to inject complexe types that can't be reduced to a String via the serializers.
- ResponseHandler
to customize response handling when interface method's response type is not one of raw types.
- ErrorHandler
to customize how the created interface behaves when any error occurs during the method call process.
Constructor Summary | |
---|---|
DefaultCRest(CRestContext context)
|
Method Summary | ||
---|---|---|
|
build(Class<T> interfaze)
Build rest-bounded instances of the given interface |
|
void |
dispose()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultCRest(CRestContext context)
context
- The CRest configuration holderMethod Detail |
---|
public <T> T build(Class<T> interfaze) throws CRestException
CRest
build
in interface CRest
T
- Interface class to get the instance frominterfaze
- Interface class to get the instance from
CRestException
- if anything goes wrongResponseHandler
,
DefaultResponseHandler
public void dispose()
dispose
in interface Disposable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |