
org.objectweb.dream.protocol.bus.BusProtocolItf Maven / Gradle / Ivy
/**
* Dream
* Copyright (C) 2003-2004 INRIA Rhone-Alpes
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Contact: [email protected]
*
* Initial developer(s): Matthieu Leclercq
* Contributor(s):
*/
package org.objectweb.dream.protocol.bus;
import java.util.Map;
import org.objectweb.dream.protocol.BindException;
import org.objectweb.dream.protocol.ExportIdentifier;
import org.objectweb.dream.protocol.IncomingPush;
import org.objectweb.dream.protocol.InvalidExportIdentifierException;
import org.objectweb.dream.protocol.Protocol;
/**
* Specialized {@link Protocol} interface for protocol components providing
* {@link BusOutgoingPush} interface as result of a binding.
*
* @see Protocol
*/
public interface BusProtocolItf extends Protocol
{
/**
* Hints key that can be used to specify the address of this protocol instance
* (ie. the index in the array of lower export identifier of the given
* {@link BusExportIdentifier} that other protocol instances must use to
* access to this one)
*/
String LOCAL_ADDRESS_HINT_KEY = "local-address";
/**
* Binds to a previously exported
* {@link org.objectweb.dream.protocol.channel.ChannelFactory} interface
* designated by the given export identifier. This methods instantiate a new
* communication channel and returns an interface on which messages can be
* sent to the server. In addition the toClientPush
interface
* is the interface on which the client want to receive messages from the
* server.
*
* @param exportId the identifier of the exported interface.
* @param toClientPush the interface on which the client want to receive
* messages from the server.
* @param hints additional parameters, can be null
.
* @return a BusOutgoingPush
interface on which message can be
* send to the exported interface.
* @throws InvalidExportIdentifierException if the given export identifier is
* incorrect.
* @throws BindException if the binding process fails.
*/
BusOutgoingPush bind(ExportIdentifier exportId, IncomingPush toClientPush,
Map hints) throws InvalidExportIdentifierException,
BindException;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy