org.jactr.core.production.request
Interface IRequest

All Superinterfaces:
java.lang.Cloneable
All Known Implementing Classes:
ChunkRequest, ChunkTypeRequest, SlotBasedRequest

public interface IRequest
extends java.lang.Cloneable

basic foundation of a module request. Request can be cloned and then bound and resolved against a variable mapping.

Author:
harrison

Method Summary
 int bind(IModel model, java.util.Map<java.lang.String,java.lang.Object> bindings, boolean iterativeCall)
          attempt to resolve and bind any variables within this request.
 IRequest clone()
          duplicate this IRequest so that the clone can be resolved against since the process is destructive
 

Method Detail

clone

IRequest clone()
duplicate this IRequest so that the clone can be resolved against since the process is destructive

Returns:
deep copy

bind

int bind(IModel model,
         java.util.Map<java.lang.String,java.lang.Object> bindings,
         boolean iterativeCall)
         throws CannotMatchException
attempt to resolve and bind any variables within this request. This method can be called iteratively and is permitted to make perminent changes to the request since this should be a clone (or transient).
bind will attempt to resolve and bind any variables it contains against those in the bindings. If it has any unresolved bindings and this is an iterative call, it can return the unresolved count. If it is not an iterativeCall, it cannot match and the exception is thrown.
If the request determines that it cannot match at anytime, it should throw the cannot match exception.

Parameters:
bindings -
iterativeCall -
Returns:
number of unresolved variables in this request
Throws:
CannotMatchException