at.chrl.callbacks

Class CallbackResult<T>

  • Type Parameters:
    T - Type of callback result


    public class CallbackResult<T>extends Object
    This class represents callback result
    Author:
    SoulKeeper
    • Field Detail

      • CONTINUE

        public static final int CONTINUE
        Continue mask for callbacks, future invocation of method or other callbacks is not blocked
        See Also:
        Constant Field Values
      • BLOCK_CALLBACKS

        public static final int BLOCK_CALLBACKS
        Block callbacks mask, future callbacks will be blocked, but method won't be
        See Also:
        Constant Field Values
      • BLOCK_CALLER

        public static final int BLOCK_CALLER
        Method will be blocked, but not callbacks
        See Also:
        Constant Field Values
      • BLOCK_ALL

        public static final int BLOCK_ALL
        Caller and another callbacks will be blocked
        See Also:
        Constant Field Values
    • Method Detail

      • getResult

        public T getResult()
        Retruns result of this callback
        Returns:
        result of this callback
      • isBlockingCallbacks

        public boolean isBlockingCallbacks()
        Returns true if is blocking callbacks
        Returns:
        true if is blocking callbacks
      • isBlockingCaller

        public boolean isBlockingCaller()
        Returns true if is blocking caller
        Returns:
        true if is blocking caller
      • newContinue

        public static <T> CallbackResult<T> newContinue()
        Returns callback for continue action, for perfomance reasons returns cached instance
        Type Parameters:
        T - type of result object, ignored, always null
        Returns:
        callback with result type continue
      • newCallbackBlocker

        public static <T> CallbackResult<T> newCallbackBlocker()
        Returns callback that blocks another callbacks, cached instance is used for perfomance reasons
        Type Parameters:
        T - type of result object, ignored, always null
        Returns:
        callback that blocks invocation of another callbacks
      • newFullBlocker

        public static <T> CallbackResult<T> newFullBlocker(T result)
        Returns callback that blocks another callbacks and method invocation.
        Callback.afterCall(Object, Object[], Object) will be invoked with the result from this call.
        Type Parameters:
        T - type of result
        Parameters:
        result - Result of callback
        Returns:
        new callback instance with given result that will be returned as method result

Copyright © 2014–2015. All rights reserved.



NOTHING
NOTHING
Add the Maven Dependecy to your project: maven dependecy for com.amazonaws : aws-java-sdk : 1.3.14