All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.xnio.ChannelDestination Maven / Gradle / Ivy

Go to download

This artifact provides a single jar that contains all classes required to use remote Jakarta Enterprise Beans and Jakarta Messaging, including all dependencies. It is intended for use by those not using maven, maven users should just import the Jakarta Enterprise Beans and Jakarta Messaging BOM's instead (shaded JAR's cause lots of problems with maven, as it is very easy to inadvertently end up with different versions on classes on the class path).

The newest version!

package org.xnio;

import java.nio.channels.Channel;
import org.xnio.channels.BoundChannel;

/**
 * A channel destination.  This is the inverse of {@code ChannelSource}; it is used to accept a single connection from a remote
 * peer.
 *
 * @param  the channel type
 *
 * @since 1.2
 */
public interface ChannelDestination {
    /**
     * Accept a connection.  The bind listener will be called when the channel is bound; the open listener will be called
     * when the connection is accepted.  It is not guaranteed that the open listener will be called after the bind listener.
     *
     * @param openListener the listener which will be notified when the channel is open, or {@code null} for none
     * @param bindListener the listener which will be notified when the channel is bound locally, or {@code null} for none
     * @return the future connection
     */
    IoFuture accept(ChannelListener openListener, ChannelListener bindListener);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy