/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You 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 org.apache.qpid.proton4j.amqp;

import java.io.IOException;

import org.apache.qpid.proton4j.buffer.ProtonBuffer;

/**
 * AMQP Transport interface.
 */
public interface Transport {

    /**
     * Feeds incoming bytes to the transport for processing.
     *
     * @param buffer
     *      The buffer containing incoming bytes.
     *
     * @throws IOException if an error occurs processing the data.
     */
    void processIncoming(ProtonBuffer buffer) throws IOException;

    /**
     * Sets the ProtocolTracer used to log frames entering and leaving the Transport.
     *
     * @param tracer
     *      The tracer instance to use, or null to disable any tracing.
     */
    void setProtocolTracer(ProtocolTracer tracer);

    /**
     * Returns the currently set ProtocolTracer, or null if none in use.
     *
     * @return the currently set ProtocolTracer, or null if none in use.
     */
    ProtocolTracer getProtocolTracer();

}

@@ -917,16 +917,78 @@
 nBuffer;
+%0Aimport org.apache.qpid.proton4j.buffer.ProtonBufferAllocator;
 %0A%0A/**%0A *
@@ -1344,16 +1344,1039 @@
 ption;%0A%0A
+    /**%0A     * Sets the ProtonBufferAllocator used by this Transport.%0A     * %3Cp%3E%0A     * When copying data, encoding types or otherwise needing to allocate memory%0A     * storage the Transport will use the assigned %7B@link ProtonBufferAllocator%7D.%0A     * If no allocator is assigned the Transport will use the default allocator.%0A     *%0A     * @param allocator%0A     *      The Allocator instance to use from this Transport.%0A     */%0A    void setBufferAllocator(ProtonBufferAllocator allocator);%0A%0A    /**%0A     * @return the currently assigned %7B@link ProtonBufferAllocator%7D.%0A     */%0A    ProtonBufferAllocator getBufferAllocator();%0A%0A    /**%0A     * Sets the TransportListener used to trap events generated by the Transport%0A     *%0A     * @param listener%0A     *      A TransportListener instance that will be notified of Transport events.%0A     */%0A    void setTransportListener(TransportListener listener);%0A%0A    /**%0A     * @return the currently assigned %7B@link TransportListener%7D.%0A     */%0A    TransportListener getTransportListener();%0A%0A
     /**%0A

Add methods for configuring the listener and allocator