PriceServer.java
资源名称:某公司的java培训教材 [点击查看]
上传用户:dinglihq
上传日期:2013-02-04
资源大小:99958k
文件大小:1k
源码类别:
Java编程
开发平台:
Java
- 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;
- }