Class ReplicatedEvent
java.lang.Object
io.a2a.extras.queuemanager.replicated.core.ReplicatedEvent
-
Constructor Summary
ConstructorsConstructorDescriptionReplicatedEvent(String taskId, io.a2a.spec.Event event) ReplicatedEvent(String taskId, io.a2a.spec.JSONRPCError error) ReplicatedEvent(String taskId, io.a2a.spec.StreamingEventKind event) -
Method Summary
Modifier and TypeMethodDescriptionio.a2a.spec.JSONRPCErrorgetError()io.a2a.spec.StreamingEventKindgetEvent()io.a2a.spec.EventGet the contained event as the generic Event interface for backward compatibility.booleanhasError()Check if this ReplicatedEvent contains an error.booleanhasEvent()Check if this ReplicatedEvent contains an event (vs an error).voidsetError(io.a2a.spec.JSONRPCError error) voidsetEvent(io.a2a.spec.StreamingEventKind event) voidtoString()
-
Constructor Details
-
ReplicatedEvent
public ReplicatedEvent() -
ReplicatedEvent
-
ReplicatedEvent
-
ReplicatedEvent
-
-
Method Details
-
getTaskId
-
setTaskId
-
getEvent
public io.a2a.spec.StreamingEventKind getEvent() -
setEvent
public void setEvent(io.a2a.spec.StreamingEventKind event) -
getError
public io.a2a.spec.JSONRPCError getError() -
setError
public void setError(io.a2a.spec.JSONRPCError error) -
getEventAsGeneric
public io.a2a.spec.Event getEventAsGeneric()Get the contained event as the generic Event interface for backward compatibility.- Returns:
- the event (either StreamingEventKind or JSONRPCError) or null if neither is set
-
hasEvent
public boolean hasEvent()Check if this ReplicatedEvent contains an event (vs an error).- Returns:
- true if it contains a StreamingEventKind event
-
hasError
public boolean hasError()Check if this ReplicatedEvent contains an error.- Returns:
- true if it contains a JSONRPCError
-
toString
-