com.leafdigital.ui.api
Interface CallbackHandler


public interface CallbackHandler

Represents callbacks for a particular object


Method Summary
 void call(java.lang.String method)
          Calls the given callback function.
 void call(java.lang.String method, java.lang.Object... params)
          Calls the given callback function.
 boolean callHandleErrors(java.lang.String method)
          Same as call, but handles errors by displaying to user.
 boolean callHandleErrors(java.lang.String method, java.lang.Object... params)
          Same as call, but handles errors by displaying to user.
 void check(java.lang.String method)
          Checks that the given callback function exists, is accessible, etc.
 void check(java.lang.String method, java.lang.Class<?>... params)
          Checks that the given callback function exists, is accessible, etc.
 

Method Detail

check

void check(java.lang.String method)
Checks that the given callback function exists, is accessible, etc.

Parameters:
method - Name of callback method
Throws:
BugException - If the callback doesn't actually exist or isn't accessible

check

void check(java.lang.String method,
           java.lang.Class<?>... params)
Checks that the given callback function exists, is accessible, etc.

Parameters:
method - Name of callback method
params - Required parameters
Throws:
BugException - If the callback doesn't actually exist or isn't accessible

call

void call(java.lang.String method)
Calls the given callback function.

Parameters:
method - Name of function
Throws:
BugException - If you haven't called checkCallback

callHandleErrors

boolean callHandleErrors(java.lang.String method)
Same as call, but handles errors by displaying to user.

Parameters:
method - Name of function
Returns:
True if function completed successfully, false if there was an error (which has already been displayed to the user)

call

void call(java.lang.String method,
          java.lang.Object... params)
Calls the given callback function.

Parameters:
method - Name of method
params - Parameters to method
Throws:
BugException - If you haven't called checkCallback

callHandleErrors

boolean callHandleErrors(java.lang.String method,
                         java.lang.Object... params)
Same as call, but handles errors by displaying to user.

Parameters:
method - Name of method
params - Parameters to method
Returns:
True if function completed successfully, false if there was an error (which has already been displayed to the user)


Copyright © 2011 Samuel Marshall. All rights reserved.