Class CloudEventsProtocolAdaptor<T extends org.apache.eventmesh.common.protocol.ProtocolTransportObject>
- java.lang.Object
-
- org.apache.eventmesh.protocol.cloudevents.CloudEventsProtocolAdaptor<T>
-
- All Implemented Interfaces:
org.apache.eventmesh.protocol.api.ProtocolAdaptor<org.apache.eventmesh.common.protocol.ProtocolTransportObject>
public class CloudEventsProtocolAdaptor<T extends org.apache.eventmesh.common.protocol.ProtocolTransportObject> extends java.lang.Object implements org.apache.eventmesh.protocol.api.ProtocolAdaptor<org.apache.eventmesh.common.protocol.ProtocolTransportObject>CloudEvents protocol adaptor, used to transform CloudEvents message to CloudEvents message.- Since:
- 1.3.0
-
-
Constructor Summary
Constructors Constructor Description CloudEventsProtocolAdaptor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.eventmesh.common.protocol.ProtocolTransportObjectfromCloudEvent(io.cloudevents.CloudEvent cloudEvent)java.lang.StringgetProtocolType()java.util.List<io.cloudevents.CloudEvent>toBatchCloudEvent(org.apache.eventmesh.common.protocol.ProtocolTransportObject protocol)io.cloudevents.CloudEventtoCloudEvent(org.apache.eventmesh.common.protocol.ProtocolTransportObject cloudEvent)
-
-
-
Method Detail
-
toCloudEvent
public io.cloudevents.CloudEvent toCloudEvent(org.apache.eventmesh.common.protocol.ProtocolTransportObject cloudEvent) throws org.apache.eventmesh.protocol.api.exception.ProtocolHandleException- Specified by:
toCloudEventin interfaceorg.apache.eventmesh.protocol.api.ProtocolAdaptor<T extends org.apache.eventmesh.common.protocol.ProtocolTransportObject>- Throws:
org.apache.eventmesh.protocol.api.exception.ProtocolHandleException
-
toBatchCloudEvent
public java.util.List<io.cloudevents.CloudEvent> toBatchCloudEvent(org.apache.eventmesh.common.protocol.ProtocolTransportObject protocol) throws org.apache.eventmesh.protocol.api.exception.ProtocolHandleException- Specified by:
toBatchCloudEventin interfaceorg.apache.eventmesh.protocol.api.ProtocolAdaptor<T extends org.apache.eventmesh.common.protocol.ProtocolTransportObject>- Throws:
org.apache.eventmesh.protocol.api.exception.ProtocolHandleException
-
fromCloudEvent
public org.apache.eventmesh.common.protocol.ProtocolTransportObject fromCloudEvent(io.cloudevents.CloudEvent cloudEvent) throws org.apache.eventmesh.protocol.api.exception.ProtocolHandleException- Specified by:
fromCloudEventin interfaceorg.apache.eventmesh.protocol.api.ProtocolAdaptor<T extends org.apache.eventmesh.common.protocol.ProtocolTransportObject>- Throws:
org.apache.eventmesh.protocol.api.exception.ProtocolHandleException
-
getProtocolType
public java.lang.String getProtocolType()
- Specified by:
getProtocolTypein interfaceorg.apache.eventmesh.protocol.api.ProtocolAdaptor<T extends org.apache.eventmesh.common.protocol.ProtocolTransportObject>
-
-