Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (C) 2014 Philip Helger ( philip[at]helger[dot]com Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
 package com.helger.webbasics.ajax;
 import java.util.Map;
Base interface for an Ajax invoker. It has a set of IAjaxExecutor instances that it can invoke.

Philip Helger
 public interface IAjaxInvoker

The milliseconds after which an execution is considered long running.
Set the milliseconds after which an execution is considered long running.

nLongRunningExecutionLimitTime The milliseconds to use. Value ≤ 0 are considered "no limit"
   void setLongRunningExecutionLimitTime (long nLongRunningExecutionLimitTime);
   IFactory <? extends IAjaxExecutorgetRegisteredExecutor (@Nullable String sFunctionName);

Create an executor associated with the given ajax function. This is a shortcut for getRegisteredExecutor (sFunctionName).create()

sFunctionName The name of the Ajax function to instantiate. May be null.
null if no such action exists.
   IAjaxExecutor createExecutor (@Nullable String sFunctionName);
   boolean isRegisteredFunction (@Nullable String sFunctionName);

Add a handler function that is used as a callback.

aFunction The Ajax function declaration to be invoked. May not be null.
   void registerFunction (@Nonnull IAjaxFunctionDeclaration aFunction);

Invoke the specified AJAX function.

sFunctionName the alias of the AJAX function to invoke. May not be null.
aAjaxExecutor The executor to be invoked. May not be null.
aRequestScope The request scope to be used for the function.
null if this is a void function, the JS string to serialize otherwise.
java.lang.Throwable In case something goes wrong
                                @Nonnull IAjaxExecutor aAjaxExecutor,
                                @Nonnull IRequestWebScopeWithoutResponse aRequestScopethrows Throwable;
New to GrepCode? Check out our FAQ X