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

com.cosylab.epics.caj.impl.Transport Maven / Gradle / Ivy

/*
 * Copyright (c) 2004 by Cosylab
 *
 * The full license specifying the redistribution, modification, usage and other
 * rights and obligations is included with the distribution of this project in
 * the file "LICENSE-CAJ". If the license is not included visit Cosylab web site,
 * .
 *
 * THIS SOFTWARE IS PROVIDED AS-IS WITHOUT WARRANTY OF ANY KIND, NOT EVEN THE
 * IMPLIED WARRANTY OF MERCHANTABILITY. THE AUTHOR OF THIS SOFTWARE, ASSUMES
 * _NO_ RESPONSIBILITY FOR ANY CONSEQUENCE RESULTING FROM THE USE, MODIFICATION,
 * OR REDISTRIBUTION OF THIS SOFTWARE.
 */

package com.cosylab.epics.caj.impl;

import java.io.IOException;
import java.net.InetSocketAddress;

import com.cosylab.epics.caj.impl.CAContext;

/**
 * Interface defining transport (connection).
 * @author Matej Sekoranja
 * @version $id$
 */
public interface Transport {

	/**
	 * Get remote address.
	 * @return remote address.
	 */
	public InetSocketAddress getRemoteAddress();

	/**
	 * Get context transport is living in.
	 * @return context transport is living in.
	 */
	public CAContext getContext();
	
	/**
	 * Transport protocol minor revision.
	 * @return protocol minor revision.
	 */
	public short getMinorRevision();
	
	/**
	 * Transport priority.
	 * @return protocol priority.
	 */
	public short getPriority();

	/**
	 * Enqueue (if supported or if necessary send immediately) request message.
	 * Message is sent immediately if its priority equals SEND_IMMEDIATELY_PRIORITY.
	 * @param requestMessage	request message to enqueue.
	 */
	public void submit(Request requestMessage) throws IOException;
	
	/**
	 * Enqueue (if necessary submit) request message.
	 * @return true on success, false on failure.
	 */
	public boolean flush();

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy