Module colesico.framework.restlet
Class RestletTeleDriverImpl
java.lang.Object
colesico.framework.restlet.internal.RestletTeleDriverImpl
- All Implemented Interfaces:
RestletTeleDriver,colesico.framework.teleapi.TeleDriver<RestletTRContext,RestletTWContext,RestletTIContext,RestletDataPort>
@Singleton public class RestletTeleDriverImpl extends java.lang.Object implements RestletTeleDriver
- Author:
- Vladlen Larionov
-
Field Summary
Fields Modifier and Type Field Description protected RestletConfigPrototypeconfigprotected RestletDataPortdataPortprotected javax.inject.Provider<colesico.framework.http.HttpContext>httpContextProvprotected org.slf4j.Loggerlogprotected colesico.framework.ioc.production.Polysupplier<RestletRequestListener>reqListenerSupprotected colesico.framework.ioc.production.Polysupplier<RestletResponseListener>respListenerSupprotected colesico.framework.ioc.scope.ThreadScopethreadScopestatic java.lang.StringX_REQUESTED_WITH_HEADERstatic java.lang.StringX_REQUESTED_WITH_HEADER_VAL -
Constructor Summary
Constructors Constructor Description RestletTeleDriverImpl(RestletConfigPrototype config, colesico.framework.ioc.scope.ThreadScope threadScope, javax.inject.Provider<colesico.framework.http.HttpContext> httpContextProv, RestletDataPort dataPort, colesico.framework.ioc.production.Polysupplier<RestletRequestListener> reqListenerSup, colesico.framework.ioc.production.Polysupplier<RestletResponseListener> respListenerSup) -
Method Summary
Modifier and Type Method Description protected java.lang.StringgetMessage(java.lang.Throwable ex)protected voidguardCSFR(colesico.framework.http.HttpRequest httpRequest)protected voidhandleCommonError(java.lang.Throwable ex, int httpCode, colesico.framework.http.HttpContext context)protected voidhandleValidationError(colesico.framework.validation.ValidationException ex, int httpCode, colesico.framework.http.HttpContext context)<S> voidinvoke(S service, colesico.framework.teleapi.MethodInvoker<S,RestletDataPort> invoker, RestletTIContext invCtx)protected <S> voidinvokeImpl(S service, colesico.framework.teleapi.MethodInvoker binder, RestletTIContext invCtx, colesico.framework.http.HttpContext httpCtx)protected voidnotifyRequestListener(colesico.framework.http.HttpContext context, java.lang.Object service)protected voidnotifyResponseListener(colesico.framework.http.HttpContext context)
-
Field Details
-
X_REQUESTED_WITH_HEADER
public static final java.lang.String X_REQUESTED_WITH_HEADER- See Also:
- Constant Field Values
-
X_REQUESTED_WITH_HEADER_VAL
public static final java.lang.String X_REQUESTED_WITH_HEADER_VAL- See Also:
- Constant Field Values
-
log
protected final org.slf4j.Logger log -
config
-
threadScope
protected final colesico.framework.ioc.scope.ThreadScope threadScope -
httpContextProv
protected final javax.inject.Provider<colesico.framework.http.HttpContext> httpContextProv -
dataPort
-
reqListenerSup
protected final colesico.framework.ioc.production.Polysupplier<RestletRequestListener> reqListenerSup -
respListenerSup
protected final colesico.framework.ioc.production.Polysupplier<RestletResponseListener> respListenerSup
-
-
Constructor Details
-
RestletTeleDriverImpl
@Inject public RestletTeleDriverImpl(RestletConfigPrototype config, colesico.framework.ioc.scope.ThreadScope threadScope, javax.inject.Provider<colesico.framework.http.HttpContext> httpContextProv, RestletDataPort dataPort, colesico.framework.ioc.production.Polysupplier<RestletRequestListener> reqListenerSup, colesico.framework.ioc.production.Polysupplier<RestletResponseListener> respListenerSup)
-
-
Method Details
-
invoke
public <S> void invoke(S service, colesico.framework.teleapi.MethodInvoker<S,RestletDataPort> invoker, RestletTIContext invCtx)- Specified by:
invokein interfacecolesico.framework.teleapi.TeleDriver<RestletTRContext,RestletTWContext,RestletTIContext,RestletDataPort>
-
guardCSFR
protected void guardCSFR(colesico.framework.http.HttpRequest httpRequest) -
notifyRequestListener
protected void notifyRequestListener(colesico.framework.http.HttpContext context, java.lang.Object service) -
notifyResponseListener
protected void notifyResponseListener(colesico.framework.http.HttpContext context) -
invokeImpl
protected <S> void invokeImpl(S service, colesico.framework.teleapi.MethodInvoker binder, RestletTIContext invCtx, colesico.framework.http.HttpContext httpCtx) -
getMessage
protected java.lang.String getMessage(java.lang.Throwable ex) -
handleCommonError
protected void handleCommonError(java.lang.Throwable ex, int httpCode, colesico.framework.http.HttpContext context) -
handleValidationError
protected void handleValidationError(colesico.framework.validation.ValidationException ex, int httpCode, colesico.framework.http.HttpContext context)
-