Package com.embabel.agent.core.hitl
Class TypeRequest
-
- All Implemented Interfaces:
-
com.embabel.agent.core.hitl.Awaitable,com.embabel.common.core.Identified,com.embabel.common.core.StableIdentified,com.embabel.common.core.types.HasInfoString,com.embabel.common.core.types.Timestamped
public final class TypeRequest<T extends Object> extends AbstractAwaitable<Class<T>, TypeResponse<T>>
Request a value of type T from the user.
The UX layer will typically generate a form from the type's schema and present it to the user. When the user provides the value, it is added to the blackboard and execution can continue.
-
-
Constructor Summary
Constructors Constructor Description TypeRequest(Class<T> type, String message, T hint, Boolean persistent)TypeRequest(Class<T> type, String message, T hint)TypeRequest(Class<T> type, String message)TypeRequest(Class<T> type)
-
Method Summary
Modifier and Type Method Description final Class<T>getType()final StringgetMessage()final TgetHint()ResponseImpactonResponse(TypeResponse<T> response, AgentProcess agentProcess)Update process state based on this response StringinfoString(Boolean verbose, Integer indent)StringtoString()-
Methods inherited from class com.embabel.agent.core.hitl.AbstractAwaitable
getId, getPayload, getTimestamp, persistent -
Methods inherited from class com.embabel.common.core.types.Timestamped
isLaterThan -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
TypeRequest
TypeRequest(Class<T> type, String message, T hint, Boolean persistent)
- Parameters:
type- The class of the requested type (for reflection/schema generation)message- Optional message to display to the user explaining what's neededhint- Optional pre-populated value to show as a starting pointpersistent- Whether this request should be persisted
-
TypeRequest
TypeRequest(Class<T> type, String message, T hint)
- Parameters:
type- The class of the requested type (for reflection/schema generation)message- Optional message to display to the user explaining what's neededhint- Optional pre-populated value to show as a starting point
-
TypeRequest
TypeRequest(Class<T> type, String message)
- Parameters:
type- The class of the requested type (for reflection/schema generation)message- Optional message to display to the user explaining what's needed
-
-
Method Detail
-
getMessage
final String getMessage()
-
onResponse
ResponseImpact onResponse(TypeResponse<T> response, AgentProcess agentProcess)
Update process state based on this response
-
infoString
String infoString(Boolean verbose, Integer indent)
-
-
-
-