@Override public boolean before(final MethodCall call) { for (final BeforeMethodCall beforeMethodCall : beforeMethodCallList) { if (!beforeMethodCall.before(call)) { return false; } } return true; } }
/** * Handles before call operation * * @param methodCall method call * @param continueCall should we continue the call. * @return call object which could have been transformed */ private MethodCall<Object> beforeMethodCall(MethodCall<Object> methodCall, boolean[] continueCall) { if (this.beforeMethodCall.before(methodCall)) { continueCall[0] = true; methodCall = transformBeforeMethodCall(methodCall); continueCall[0] = this.beforeMethodCallAfterTransform.before(methodCall); return methodCall; } else { continueCall[0] = false; } return methodCall; }
private MethodCall<Object> beforeMethodProcessing(MethodCall<Object> methodCall, boolean[] continueFlag) { if (!beforeMethodCall.before(methodCall)) { continueFlag[0] = false; } if (requestObjectTransformer != null && requestObjectTransformer != ServiceConstants.NO_OP_ARG_TRANSFORM) { final Object arg = requestObjectTransformer.transform(methodCall); methodCall = MethodCallBuilder.transformed(methodCall, arg); } if (beforeMethodCallAfterTransform != null && beforeMethodCallAfterTransform != ServiceConstants.NO_OP_BEFORE_METHOD_CALL) { if (!beforeMethodCallAfterTransform.before(methodCall)) { continueFlag[0] = false; } } return methodCall; }
@Override public void call(MethodCall<Object> methodCall) { if (methodCall == null) { return; } beforeMethodCall.before(methodCall); if (!methodCalls.offer(methodCall)) { flush(); } else { return; } if (!methodCalls.offer(methodCall)) { throw new IllegalStateException("Queue is full and can't be emptied"); } }
@Override public boolean before(final MethodCall call) { for (final BeforeMethodCall beforeMethodCall : beforeMethodCallList) { if (!beforeMethodCall.before(call)) { return false; } } return true; } }
@Override public boolean before(final MethodCall call) { for (final BeforeMethodCall beforeMethodCall : beforeMethodCallList) { if (!beforeMethodCall.before(call)) { return false; } } return true; } }
/** * Handles before call operation * * @param methodCall method call * @param continueCall should we continue the call. * @return call object which could have been transformed */ private MethodCall<Object> beforeMethodCall(MethodCall<Object> methodCall, boolean[] continueCall) { if (this.beforeMethodCall.before(methodCall)) { continueCall[0] = true; methodCall = transformBeforeMethodCall(methodCall); continueCall[0] = this.beforeMethodCallAfterTransform.before(methodCall); return methodCall; } else { continueCall[0] = false; } return methodCall; }
/** * Handles before call operation * * @param methodCall method call * @param continueCall should we continue the call. * @return call object which could have been transformed */ private MethodCall<Object> beforeMethodCall(MethodCall<Object> methodCall, boolean[] continueCall) { if (this.beforeMethodCall.before(methodCall)) { continueCall[0] = true; methodCall = transformBeforeMethodCall(methodCall); continueCall[0] = this.beforeMethodCallAfterTransform.before(methodCall); return methodCall; } else { continueCall[0] = false; } return methodCall; }
@Override public void call(MethodCall<Object> methodCall) { beforeMethodCall.before(methodCall); if (!methodCalls.offer(methodCall)) { flush(); } else { return; } if (!methodCalls.offer(methodCall)) { throw new IllegalStateException("Queue is full and can't be emptied"); } }
private MethodCall<Object> beforeMethodProcessing(MethodCall<Object> methodCall, boolean[] continueFlag) { if (!beforeMethodCall.before(methodCall)) { continueFlag[0] = false; } if (requestObjectTransformer != null && requestObjectTransformer != ServiceConstants.NO_OP_ARG_TRANSFORM) { final Object arg = requestObjectTransformer.transform(methodCall); methodCall = MethodCallBuilder.transformed(methodCall, arg); } if (beforeMethodCallAfterTransform != null && beforeMethodCallAfterTransform != ServiceConstants.NO_OP_BEFORE_METHOD_CALL) { if (!beforeMethodCallAfterTransform.before(methodCall)) { continueFlag[0] = false; } } return methodCall; }
private MethodCall<Object> beforeMethodProcessing(MethodCall<Object> methodCall, boolean[] continueFlag) { if (!beforeMethodCall.before(methodCall)) { continueFlag[0] = false; } if (requestObjectTransformer != null && requestObjectTransformer != ServiceConstants.NO_OP_ARG_TRANSFORM) { final Object arg = requestObjectTransformer.transform(methodCall); methodCall = MethodCallBuilder.transformed(methodCall, arg); } if (beforeMethodCallAfterTransform != null && beforeMethodCallAfterTransform != ServiceConstants.NO_OP_BEFORE_METHOD_CALL) { if (!beforeMethodCallAfterTransform.before(methodCall)) { continueFlag[0] = false; } } return methodCall; }
@Override public void call(MethodCall<Object> methodCall) { if (methodCall == null) { return; } beforeMethodCall.before(methodCall); if (!methodCalls.offer(methodCall)) { flush(); } else { return; } if (!methodCalls.offer(methodCall)) { throw new IllegalStateException("Queue is full and can't be emptied"); } }