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

org.piax.gtrans.raw.MonoTransport Maven / Gradle / Ivy

The newest version!
/*
 * MonoTransport.java
 * 
 * Copyright (c) 2012-2015 National Institute of Information and 
 * Communications Technology
 * 
 * You can redistribute it and/or modify it under either the terms of
 * the AGPLv3 or PIAX binary code license. See the file COPYING
 * included in the PIAX package for more in detail.
 * 
 * $Id: MonoTransport.java 718 2013-07-07 23:49:08Z yos $
 */

package org.piax.gtrans.raw;

import java.io.IOException;

import org.piax.common.Endpoint;
import org.piax.gtrans.Channel;
import org.piax.gtrans.ChannelListener;
import org.piax.gtrans.ChannelTransport;
import org.piax.gtrans.ProtocolUnsupportedException;
import org.piax.gtrans.TransportListener;

/**
 * 
 */
public interface MonoTransport extends ChannelTransport {
    
    void setListener(TransportListener listener);
    TransportListener getListener();
    void setChannelListener(ChannelListener listener);
    ChannelListener getChannelListener();

    // for connection less communication
    void send(E dst, Object msg) throws ProtocolUnsupportedException,
            IOException;

    // for connection based communication
    Channel newChannel(E dst) throws ProtocolUnsupportedException,
            IOException;

    Channel newChannel(E dst, int timeout)
            throws ProtocolUnsupportedException, IOException;

    Channel newChannel(E dst, boolean isDuplex)
            throws ProtocolUnsupportedException, IOException;

    Channel newChannel(E dst, boolean isDuplex, int timeout)
            throws ProtocolUnsupportedException, IOException;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy