@param apiHandler

@throws ApiException
182022
private static void getResponses(RestRequestHandlerApi apiHandler) throws ApiException {
		
		
		String earliest = new DateTime(DateTimeZone.UTC).toString();
		
		//Getting all the responses before the time set by the "earliest" parameter. 
		List<JsonResponse> responses =apiHandler.resourceRestRequestHandlerGetResponsesGET(earliest);
		
		for (JsonResponse resp : responses) {
			System.out.print(resp.toString() + "\n");
		}
	}
533453
public void addHandler(AbstractHandler handler) {
    HandlerList handlers = new HandlerList();
    handlers.addHandler(handler);
    for (Handler h : mServer.getHandlers()) {
      handlers.addHandler(h);
    }
    mServer.setHandler(handlers);
  }
658773
public void setHandler (@Nonnull final EJSEvent eJSEvent, @Nonnull final IHasJSCode aNewHandler)
  {
    ValueEnforcer.notNull (eJSEvent, "JSEvent");
    ValueEnforcer.notNull (aNewHandler, "NewHandler");

    // Set only the new handler and remove any existing handler
    m_aEvents.put (eJSEvent, new CollectingJSCodeProvider ().appendFlattened (aNewHandler));
  }
264323
function handler(responseCode, data, ioArgs) {
                    that.xhr = ioArgs.xhr;
                    that.statusCode = that.xhr && !that.xhr.timedOut && that.xhr.status || 0;
                    if (that.canceled) {
                        logger.debug("Request [" + that.id + "] was canceled, not calling handler");
                    } else {
                        that.pending = false;
                        that.complete = true;
                        paramHandler(responseCode, data, ioArgs);
                    }
                }
766230
public static void register(ApiFeature apiFeature, Callback<Void, Exception> callback) {
        if (apiFeature != null && apiFeature.getApiKey() != null && !apiFeature.getApiKey().isEmpty()) {
            JavaScriptObject scriptObject = ScriptInjector.fromUrl(apiFeature.constructApiUrl())
                    .setWindow(ScriptInjector.TOP_WINDOW)
                    .setCallback(new Callback<Void, Exception>() {
                        @Override
                        public void onFailure(Exception e) {
                            callback.onFailure(e);
                        }

                        @Override
                        public void onSuccess(Void aVoid) {
                            callback.onSuccess(aVoid);
                        }
                    }).inject();
            features.put(apiFeature, scriptObject);
        }
    }
271558
public void addHandler(AptEvent event, AptMethod eventHandler)
    {
        assert event.getEventSet() == _eventSet;
        _handlerMap.put(event, eventHandler);
    }
421566
protected static void post(String resource, RequestParams params, ResponseHandler responseHandler) {
        requestAuthenticated(new Request(WonderPushConfiguration.getUserId(), HttpMethod.POST, resource, params, responseHandler));
    }
298916
protected void notifyToHandler(ServerHandlerClass handler, 
            ApiZone zone, ApiBuddyImpl buddy) {
        ReflectMethodUtil.invokeHandleMethod(
                handler.getHandleMethod(), 
                handler.newInstance(), 
                context, zone, buddy);
    }
89168
public void setInvocationHandler(Object proxy, InvocationHandler handler) {
        Field field = getInvocationHandlerField();
        try {
            field.set(proxy, handler);
        } catch (IllegalArgumentException e) {
            throw new RuntimeException(e);
        } catch (IllegalAccessException e) {
            throw new RuntimeException(e);
        }
    }
1266093
def Handle(self, args, token=None):
    """"""

    if not args.name:
      raise ValueError("Name not specified.")

    return ApiConfigOption().InitFromConfigOption(args.name)
946540
private <T> HttpResponseHandler<T> getNonNullResponseHandler(
            HttpResponseHandler<T> responseHandler) {
        if (responseHandler != null) {
            return responseHandler;
        } else {
            // Return a Dummy, No-Op handler
            return new HttpResponseHandler<T>() {

                @Override
                public T handle(HttpResponse response) throws Exception {
                    return null;
                }

                @Override
                public boolean needsConnectionLeftOpen() {
                    return false;
                }
            };
        }
    }
420872
public String handleCallBack(HttpMessage msg)  throws ApiException {
		throw new ApiException (ApiException.Type.URL_NOT_FOUND, msg.getRequestHeader().getURI().toString());
	}
822615
def _handle_api(self, handler, handler_args, handler_kwargs):
        
        try:
            status_code, return_value = handler(*handler_args, **handler_kwargs)
        except APIError as error:
            return error.send()

        web.ctx.status = _convert_http_status(status_code)
        return _api_convert_output(return_value)
562861
@Override
    protected void addRequestHandler(String requestId, IClientRequestHandler requestHandler) {
    	super.addRequestHandler(requestId, requestHandler);
    	registerClientRequestHandler(requestId, requestHandler);
    }
829811
public function addHandler(string $type, RequestHandlerInterface $handler): void
    {
        $this->handlers[$type] = $handler;
    }
40174
public void setParameterNameProvider(Configuration<?> apiConfig) {
        Class<? extends ParameterNameProvider> clazz = null;
        ParameterNameProvider pnp = null;
        if (parameterNameProvider != null && versionID >= 11) {
            try {
                clazz = loadClass(parameterNameProvider).asSubclass(ParameterNameProvider.class);
                pnp = instantiateClass(clazz);
            } catch (Throwable t) {
                ValidationException e = new ValidationException(t);
                throw e;
            }
        }

        if (pnp != null) {
            apiConfig.parameterNameProvider(pnp);
        }
    }
1357877
public void setDataHandler(DataHandler dataHandler) {
        this._dataHandler = dataHandler;
        if(dataHandler == null) {
            _properties.remove(PARAM_DATA_HANDLER_CLASS);
        } else {
            if (dataHandler.getClass() != DefaultDataSetHandler.class &&
                dataHandler.getClass() != DefaultDataStoreHandler.class) {
                _properties.setProperty(PARAM_DATA_HANDLER_CLASS, dataHandler.getClass().getName());
            }
        }
    }