priceserver.java

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

JAVA
42
字号
package bible.rmi.example3;

import weblogic.rmi.Remote;

/**
 * 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 java.rmi.RemoteException;

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

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

  /**
   * Submits an order for the client, then asynchronously
   * notifies that client when the order gets executed.
   * @param order Order to be submitted by the client.
   * @param clientRef Remote reference for the client, used for asynchronous execution notification.
   * @param client
   */
  public void enterMarketOrder(Order order, ExecutionAlert client) throws java.rmi.RemoteException;
}

⌨️ 快捷键说明

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