PriceServer.java
资源名称:某公司的java培训教材 [点击查看]
上传用户:dinglihq
上传日期:2013-02-04
资源大小:99958k
文件大小:1k
源码类别:
Java编程
开发平台:
Java
- package bible.rmi.example4;
- import weblogic.rmi.Remote;
- /**
- * Interface PriceServer
- *
- *
- * @author
- * @version %I%, %G%
- */
- public interface PriceServer extends weblogic.rmi.Remote {
- // Used to locate or register a PriceServer via RMI.
- /** Field PRICESERVERNAME */
- public static final String PRICESERVERNAME = "priceserver";
- // Return the current price of the given security.
- /**
- * Method getPrice
- *
- *
- * @param symbol
- *
- * @return
- *
- */
- public float getPrice(String symbol) throws java.rmi.RemoteException;
- // Set the price of the given security.
- /**
- * Method setPrice
- *
- *
- * @param symbol
- * @param price
- *
- */
- public void setPrice(String symbol, float price) throws java.rmi.RemoteException;
- // Return all ticker symbols in this server's database.
- /**
- * Method getSecurities
- *
- *
- * @return
- *
- */
- public String[] getSecurities() throws java.rmi.RemoteException;
- // Submit an order on a client's behalf, then notify the submitting
- // client when the order is executed.
- /**
- * Method enterMarketOrder
- *
- *
- * @param order
- * @param client
- *
- */
- public void enterMarketOrder(Order order, ExecutionAlert client) throws java.rmi.RemoteException;
- }