Interface StreamingEventKindMapper_v0_3
- All Known Implementing Classes:
StreamingEventKindMapper_v0_3Impl
public interface StreamingEventKindMapper_v0_3
Bidirectional polymorphic mapper for converting StreamingEventKind between A2A Protocol v0.3 and v1.0.
Handles conversion for all StreamingEventKind implementers:
Uses instanceof dispatch to determine the concrete type and delegates to the appropriate mapper.
Note: The same types implement both EventKind and
StreamingEventKind, so this mapper uses the same delegation logic as EventKindMapper_v0_3.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StreamingEventKindMapper_v0_3Singleton instance accessed viaA2AMappers_v0_3factory. -
Method Summary
Modifier and TypeMethodDescriptiondefault StreamingEventKind_v0_3Converts v1.0 StreamingEventKind to v0.3 StreamingEventKind.default StreamingEventKindConverts v0.3 StreamingEventKind to v1.0 StreamingEventKind.
-
Field Details
-
INSTANCE
Singleton instance accessed viaA2AMappers_v0_3factory.
-
-
Method Details
-
toV10
Converts v0.3 StreamingEventKind to v1.0 StreamingEventKind.Uses instanceof dispatch to determine the concrete type and delegates to the appropriate mapper.
- Parameters:
v03- the v0.3 streaming event kind- Returns:
- the equivalent v1.0 streaming event kind
- Throws:
InvalidRequestError- if the streaming event kind type is unrecognized
-
fromV10
Converts v1.0 StreamingEventKind to v0.3 StreamingEventKind.Uses instanceof dispatch to determine the concrete type and delegates to the appropriate mapper.
- Parameters:
v10- the v1.0 streaming event kind- Returns:
- the equivalent v0.3 streaming event kind
- Throws:
InvalidRequestError- if the streaming event kind type is unrecognized
-