Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /* ************************************************************************
 #
 #  DivConq
 #
 #  http://divconq.com/
 #
 #  Copyright:
 #    Copyright 2014 eTimeline, LLC. All rights reserved.
 #
#  License:
#    See the license.txt file in the project's top-level directory for details.
#  Authors:
#    * Andy White
************************************************************************ */
package divconq.lang.op;
Provides the same function support as

Parameters:
<T> the return type
Author(s):
Andy
See also:
OperationCallback, however allows for more than a true/false result type. A specific return type may be provided using generics.
abstract public class FuncCallback<T> extends OperationCallback {
	protected T value = null;
		 
	public FuncCallback() {
		super();
	}
	public FuncCallback(TimeoutPlan plan) {
		super(plan);
	}
  
  

Returns:
function result if call was a success
	public T getResult() {
	    return this.;
	}
 
  

Parameters:
v result to use, set by the method called
	public void setResult(T v) {
	    this. = v;
	}
	public boolean isNotEmptyResult() {
		return !Struct.objectIsEmpty(this.);
	}
	public boolean isEmptyResult() {
		return Struct.objectIsEmpty(this.);
	}
	public Message toLogMessage() {
		Message msg = super.toLogMessage();
		if (this. != null)
			msg.setField("Body"this.);
		return msg;
	}
New to GrepCode? Check out our FAQ X