Class ReplicatedEvent

java.lang.Object
io.a2a.extras.queuemanager.replicated.core.ReplicatedEvent

public class ReplicatedEvent extends Object
  • Constructor Details

    • ReplicatedEvent

      public ReplicatedEvent()
    • ReplicatedEvent

      public ReplicatedEvent(String taskId, io.a2a.spec.StreamingEventKind event)
    • ReplicatedEvent

      public ReplicatedEvent(String taskId, io.a2a.spec.JSONRPCError error)
    • ReplicatedEvent

      public ReplicatedEvent(String taskId, io.a2a.spec.Event event)
  • Method Details

    • getTaskId

      public String getTaskId()
    • setTaskId

      public void setTaskId(String taskId)
    • 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

      public String toString()
      Overrides:
      toString in class Object