org.craft.atom.io.IoConnector Maven / Gradle / Ivy
package org.craft.atom.io;
import java.net.SocketAddress;
import java.util.concurrent.Future;
/**
* Connects to server based on specific implementation.
*
* @author mindwind
* @version 1.0, Mar 12, 2013
*/
public interface IoConnector extends IoReactor, IoConnectorMXBean {
/**
* Connects to the specified ip and port.
*
* @param ip
* @param port
* @return Future
instance which is completed when the channel initiated by this call succeeds or fails.
*/
Future> connect(String ip, int port);
/**
* Connects to the specified remote address.
*
* @param remoteAddress
* @return Future
instance which is completed when the channel initiated by this call succeeds or fails.
*/
Future> connect(SocketAddress remoteAddress);
/**
* Connects to the specified remote address and binds to the specified local address.
*
* @param remoteAddress
* @param localAddress
* @return Future
instance which is completed when the channel initiated by this call succeeds or fails.
*/
Future> connect(SocketAddress remoteAddress, SocketAddress localAddress);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy