/*
* Copyright 2018 the original author or 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.vertx.proton.streams;

import org.apache.qpid.proton.amqp.transport.Source;
import org.apache.qpid.proton.amqp.transport.Target;
import org.reactivestreams.Subscriber;

/*
 * An AMQP producer, presented as a reactive streams Subscriber
 */
public interface ProtonSubscriber<T> extends Subscriber<T> {

  
Sets the local Target details. Only useful to call before subscribing.
Params:
  • target – the target
Returns:the subscriber
/** * Sets the local Target details. Only useful to call before subscribing. * * @param target * the target * @return the subscriber */
ProtonSubscriber<T> setTarget(Target target);
Retrieves the local Target details for access or customisation.
Returns:the local Target, or null if there was none.
/** * Retrieves the local Target details for access or customisation. * * @return the local Target, or null if there was none. */
Target getTarget();
Sets the local Source details. Only useful to call before subscribing.
Params:
  • source – the source
Returns:the subscriber
/** * Sets the local Source details. Only useful to call before subscribing. * * @param source * the source * @return the subscriber */
ProtonSubscriber<T> setSource(Source source);
Retrieves the local Source details for access or customisation.
Returns:the local Source, or null if there was none.
/** * Retrieves the local Source details for access or customisation. * * @return the local Source, or null if there was none. */
Source getSource(); }