/** * Cancel. * * @param taskId * the task id */ @Access(AccessType.UNAVAILABLE) protected void cancel(final String taskId) { final Scheduler scheduler = this.scheduler; if (scheduler == null) return; scheduler.cancel(taskId); }
/** * Schedule an RPC call at a specified due time. * * @param method * the method * @param params * the params * @param delay * the delay * @return the string */ @Access(AccessType.UNAVAILABLE) protected String schedule(final String method, final ObjectNode params, final long delay) { final Scheduler scheduler = this.scheduler; if (scheduler == null) return ""; return scheduler.schedule(new JSONRequest(method, params), delay); }
/** * Destroy the agent. */ @Access(AccessType.UNAVAILABLE) protected void destroy() { eventCaller.on("destroy"); if (scheduler != null) { scheduler.delete(); scheduler = null; } if (transport != null) { transport.disconnect(); transport.delete(); transport = null; } if (protocolStack != null) { protocolStack.delete(); protocolStack = null; } if (state != null) { state.delete(); state = null; } if (is != null) { is.deregister(agentId); is = null; } }
/** * Schedule an RPC call at a specified due time. * * @param method * the method * @param params * the params * @param delay * the delay * @return the string */ @Access(AccessType.UNAVAILABLE) protected String schedule(final String method, final ObjectNode params, final int delay) { final Scheduler scheduler = this.scheduler; if (scheduler == null) return ""; return scheduler.schedule(new JSONRequest(method, params), delay); }
/** * Schedule an RPC call at a specified due time. * * @param method * the method * @param params * the params * @param due * the due * @return the string */ @Access(AccessType.UNAVAILABLE) protected String schedule(final String method, final ObjectNode params, final DateTime due) { final Scheduler scheduler = this.scheduler; if (scheduler == null) return ""; return scheduler.schedule(new JSONRequest(method, params), due); }