Envelope unmarshaller funcional interface

Signed-off-by: Fabio José <fabiojose@gmail.com>
This commit is contained in:
Fabio José 2019-09-12 22:22:38 -03:00
parent 2d878fc146
commit 9b515cbff2
1 changed files with 35 additions and 0 deletions

View File

@ -0,0 +1,35 @@
/**
* Copyright 2019 The CloudEvents Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.cloudevents.fun;
import io.cloudevents.Attributes;
import io.cloudevents.CloudEvent;
/**
*
* @author fabiojose
*
*/
public interface EnvelopeUnmarshaller<A extends Attributes, T, P> {
/**
* Unmarshals the payload into {@link CloudEvent} instance impl
* @param payload The envelope payload
* @return The unmarshalled impl of CloudEvent
*/
CloudEvent<A, T> unmarshal(P payload);
}