at.chrl.callbacks.util

Class GlobalCallbackHelper



  • public class GlobalCallbackHelperextends Object
    This class is used to manage global callbacks.
    Callbacks are stored according to their priority.
    Author:
    SoulKeeper
    • Method Detail

      • addCallback

        public static <T> void addCallback(Callback<T> callback)
        Registers global callback.
        Please note that invoking this method from scripts can cause memory leak, callbacks are not weak references. You should unregister callback manually in case of global adding global callback.
        Parameters:
        callback - callback to add
      • removeCallback

        public static <T> void removeCallback(Callback<T> callback)
        Removes global callback from the list.
        Parameters:
        callback - callback to remove
      • beforeCall

        public static CallbackResult<?> beforeCall(Object obj,                                           Class callbackClass,                                           Object... args)
        THIS METHOD SHOULD NOT BE CALLED MANUALLY
        Parameters:
        obj - method on whom was invoked
        callbackClass - what method was actually invoked
        args - method arguments
        Returns:
        result of invocation callbacks
      • afterCall

        public static CallbackResult<?> afterCall(Object obj,                                          Class callbackClass,                                          Object[] args,                                          Object result)
        THIS METHOD SHOULD NOT BE CALLED MANUALLY
        Parameters:
        obj - method on whom was invoked
        callbackClass - what method was actually invoked
        args - method arguments
        result - original method result
        Returns:
        global result, callback or method, doesn't matter

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