⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 transport.java

📁 JGRoups源码
💻 JAVA
字号:
package org.jgroups.tests.perf;import java.util.Properties;import java.util.Map;/** * Generic transport abstraction for all different transports (JGroups, JMS, UDP, TCP). The lifecycle is * <ol> * <li>Create an instance of the transport (using the empty constructor) * <li>Call <code>create()</code> * <li>Possibly call <code>setReceiver()</code> * <li>Call <code>start()</code> * <li>Call <code>send()</code> * <li>Call <code>stop()</stop> * <li>Call <code>destroy()</code> (alternatively call <code>start()</code> again) * </ol> * @author Bela Ban Jan 22 * @author 2004 * @version $Id: Transport.java,v 1.3 2005/07/26 11:50:22 belaban Exp $ */public interface Transport {    /** Create the transport */    void create(Properties properties) throws Exception;    /** Get the local address (= endpoint) of this transport. Guaranteed to be called <em>after</em>     *  <code>create()</code>, possibly even later (after <code>start()</code>) */    Object getLocalAddress();    /** Start the transport */    void start() throws Exception;    /** Stop the transport */    void stop();    /** Destroy the transport. Transport cannot be reused after this call, but a new instance has to be created */    void destroy();    /** Set the receiver */    void setReceiver(Receiver r);    Map dumpStats();    /**     * Send a message     * @param destination A destination. If null, send a message to all members     * @param payload A buffer to be sent     * @throws Exception     */    void send(Object destination, byte[] payload) throws Exception;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -