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

jadex.bridge.IOutputConnection Maven / Gradle / Ivy

Go to download

Jadex bridge is a base package for kernels and platforms, i.e., it is used by both and provides commonly used interfaces and classes for active components and their management.

There is a newer version: 4.0.267
Show newest version
package jadex.bridge;

import java.io.InputStream;

import jadex.commons.future.IFuture;
import jadex.commons.future.ISubscriptionIntermediateFuture;

/**
 *  Interface for output connection.
 */
public interface IOutputConnection extends IConnection
{
	/**
	 *  Write the content to the stream.
	 *  @param data The data.
	 */
	public IFuture write(byte[] data);
	
	/**
	 *  Flush the data.
	 */
	public void flush();
	
	/**
	 *  Wait until the connection is ready for the next write.
	 *  @return Calls future when next data can be written. Provides a value of how much data should be given to the connection for best performance.
	 */
	public IFuture waitForReady();
	
	/**
	 *  Write all data from input stream to the connection.
	 *  The result is an intermediate future that reports back the size that was written.
	 *  It can also be used to terminate sending.
	 *  @param is The input stream.
	 */
	public ISubscriptionIntermediateFuture writeFromInputStream(final InputStream is, final IExternalAccess component);
	
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy