priceserver.java

来自「100多M的J2EE培训内容」· Java 代码 · 共 34 行

JAVA
34
字号
package bible.rmi.example2;

import weblogic.rmi.Remote;
import java.rmi.RemoteException;

/**
 * PriceServer provides prices on securities for remote clients.
 */
public interface PriceServer extends weblogic.rmi.Remote {

  /**
   * Logical name used to locate and register a PriceServer via RMI.
   */
  public static final String PRICESERVERNAME = "priceserver";

  /**
   * Returns the price of the given security.
   * @param symbol
   */
  public float getPrice(String symbol) throws RemoteException;

  /**
   * Sets the price of the given security.
   * @param symbol
   * @param price
   */
  public void setPrice(String symbol, float price) throws RemoteException;

  /**
   * Returns all ticker symbols in this server's database.
   */
  public String[] getSecurities() throws RemoteException;
}

⌨️ 快捷键说明

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