Record Class AgentSpecificationImpl
java.lang.Object
java.lang.Record
dev.langchain4j.agentic.internal.AgentSpecificationImpl
- All Implemented Interfaces:
AgentSpecification
public record AgentSpecificationImpl(String name, String uniqueName, String description, String outputName, boolean async, Consumer<AgentRequest> invocationListener, Consumer<AgentResponse> completionListener)
extends Record
implements AgentSpecification
-
Constructor Summary
ConstructorsConstructorDescriptionAgentSpecificationImpl
(String name, String uniqueName, String description, String outputName, boolean async, Consumer<AgentRequest> invocationListener, Consumer<AgentResponse> completionListener) Creates an instance of aAgentSpecificationImpl
record class. -
Method Summary
Modifier and TypeMethodDescriptionvoid
afterInvocation
(AgentResponse response) boolean
async()
Returns the value of theasync
record component.void
beforeInvocation
(AgentRequest request) Returns the value of thecompletionListener
record component.Returns the value of thedescription
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.Returns the value of theinvocationListener
record component.name()
Returns the value of thename
record component.Returns the value of theoutputName
record component.final String
toString()
Returns a string representation of this record class.Returns the value of theuniqueName
record component.
-
Constructor Details
-
AgentSpecificationImpl
public AgentSpecificationImpl(String name, String uniqueName, String description, String outputName, boolean async, Consumer<AgentRequest> invocationListener, Consumer<AgentResponse> completionListener) Creates an instance of aAgentSpecificationImpl
record class.- Parameters:
name
- the value for thename
record componentuniqueName
- the value for theuniqueName
record componentdescription
- the value for thedescription
record componentoutputName
- the value for theoutputName
record componentasync
- the value for theasync
record componentinvocationListener
- the value for theinvocationListener
record componentcompletionListener
- the value for thecompletionListener
record component
-
-
Method Details
-
beforeInvocation
- Specified by:
beforeInvocation
in interfaceAgentSpecification
-
afterInvocation
- Specified by:
afterInvocation
in interfaceAgentSpecification
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with thecompare
method from their corresponding wrapper classes. -
name
Returns the value of thename
record component.- Specified by:
name
in interfaceAgentSpecification
- Returns:
- the value of the
name
record component
-
uniqueName
Returns the value of theuniqueName
record component.- Specified by:
uniqueName
in interfaceAgentSpecification
- Returns:
- the value of the
uniqueName
record component
-
description
Returns the value of thedescription
record component.- Specified by:
description
in interfaceAgentSpecification
- Returns:
- the value of the
description
record component
-
outputName
Returns the value of theoutputName
record component.- Specified by:
outputName
in interfaceAgentSpecification
- Returns:
- the value of the
outputName
record component
-
async
public boolean async()Returns the value of theasync
record component.- Specified by:
async
in interfaceAgentSpecification
- Returns:
- the value of the
async
record component
-
invocationListener
Returns the value of theinvocationListener
record component.- Returns:
- the value of the
invocationListener
record component
-
completionListener
Returns the value of thecompletionListener
record component.- Returns:
- the value of the
completionListener
record component
-