/**
 * 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 java.util.Map;

import io.cloudevents.format.Format;

/**
 * 
 * @author fabiojose
 *
 */
@FunctionalInterface
public interface FormatBuilder<P> {

	/**
	 * Builds a format to be used for the wire serialization
	 */
	Format<P> build(P payload, Map<String, Object> headers);
	
}

/**
 * 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 java.util.Map;

import io.cloudevents.format.Wire;

/**
 * 
 * @author fabiojose
 *
 */
@FunctionalInterface
public interface WireBuilder<P, K, V> {

	/**
	 * Builds a wire format
	 */
	Wire<P, K, V> build(P payload, Map<K, V> headers);
	
}

Rename to wire instead of format
Rename to wire instead of format

Signed-off-by: Fabio José <34f3a7e4e4d9fe971c99ebc4af947a5309eca653@gmail.com>
