/** * Add an actual request created and executed by the invocation of this function. This method will be called by the * {@link Processor} and should not be called elsewhere. * * @param request the request * @throws IllegalArgumentException if the request reference is null */ public void addActualRequest( Request request ) { checkNotFrozen(); CheckArg.isNotNull(request, "request"); if (requests == null) requests = new ArrayList<Request>(); requests.add(request); }
/** * Set the value for the named output parameter for the function. If the value is nul, the parameter will be removed. * * @param name the name of the output parameter; may not be null * @param value the value for the named parameter; may be null * @return the prior value for this named parameter * @throws IllegalArgumentException if the name is null or empty * @throws IllegalStateException if the request is frozen */ public Serializable setOutput( String name, Serializable value ) { checkNotFrozen(); CheckArg.isNotEmpty(name, "name"); return value != null ? this.outputs.put(name, value) : this.outputs.remove(name); }
/** * Add the actual requests created and executed by the invocation of this function. This method will be called by the * {@link Processor} and should not be called elsewhere. * * @param requests the requests * @throws IllegalArgumentException if the requests reference is null */ public void addActualRequests( Iterable<Request> requests ) { checkNotFrozen(); CheckArg.isNotNull(requests, "requests"); if (this.requests == null) requests = new ArrayList<Request>(); for (Request request : requests) { if (request != null) this.requests.add(request); } }
/** * Sets the actual and complete location of the node whose children and properties have been read. This method must be called * when processing the request, and the actual location must have a {@link Location#getPath() path}. * * @param actual the actual location of the node being read, or null if the {@link #at() current location} should be used * @throws IllegalArgumentException if the actual location is null or does not have a path. * @throws IllegalStateException if the request is frozen */ public void setActualLocationOfNode( Location actual ) { checkNotFrozen(); CheckArg.isNotNull(actual, "actual"); if (!actual.hasPath()) { throw new IllegalArgumentException(GraphI18n.actualLocationMustHavePath.text(actual)); } this.actualLocation = actual; }