public static void main(String args[]) { QuoteClient client=new QuoteClient(); client.start(); }
public QuoteClient() { super(); try { channel=new JChannel(props); channel.setDiscardOwnMessages(true); disp=(RpcDispatcher)new RpcDispatcher(channel, this).setMembershipListener(this); channel.connect(channel_name); } catch(Exception e) { System.err.println("QuoteClient(): " + e); } addWindowListener(this); }
String stock_name=stock_field.getText(); if(stock_name == null || stock_name.isEmpty()) { showMsg("Stock name is empty !"); return; showMsg("Looking up value for " + stock_name + ':'); RspList<Object> quotes=disp.callRemoteMethods(null, "getQuote", new Object[]{stock_name}, new Class[]{String.class}, clearMsg(); showMsg("Value for " + stock_name + " not found"); if(stock_name == null || stock_val == null || stock_name.isEmpty() || stock_val.isEmpty()) { showMsg("Stock name and value have to be present to enter a new value"); return; showMsg("Stock " + stock_name + " set to " + val); break; case "All": listbox.removeAll(); showMsg("Getting all stocks:"); RspList<Object> rsp_list=disp.callRemoteMethods(null, "getAllStocks", null, null, showMsg("No stocks found"); return;
public void viewAccepted(View new_view) { setTitle("Members in " + channel_name + ": " + (new_view.size() - 1)); }
String stock_name=stock_field.getText(); if(stock_name == null || stock_name.isEmpty()) { showMsg("Stock name is empty !"); return; showMsg("Looking up value for " + stock_name + ':'); RspList<Object> quotes=disp.callRemoteMethods(null, "getQuote", new Object[]{stock_name}, new Class[]{String.class}, clearMsg(); showMsg("Value for " + stock_name + " not found"); if(stock_name == null || stock_val == null || stock_name.isEmpty() || stock_val.isEmpty()) { showMsg("Stock name and value have to be present to enter a new value"); return; showMsg("Stock " + stock_name + " set to " + val); break; case "All": listbox.removeAll(); showMsg("Getting all stocks:"); RspList<Object> rsp_list=disp.callRemoteMethods(null, "getAllStocks", null, null, showMsg("No stocks found"); return;
public void viewAccepted(View new_view) { setTitle("Members in " + channel_name + ": " + (new_view.size() - 1)); }
String stock_name=stock_field.getText(); if(stock_name == null || stock_name.length() == 0) { showMsg("Stock name is empty !"); return; showMsg("Looking up value for " + stock_name + ':'); rsp_list=disp.callRemoteMethods(null, "getQuote", new Object[]{stock_name}, new String[]{String.class.getName()}, clearMsg(); showMsg("Value for " + stock_name + " not found"); if(stock_name == null || stock_val == null || stock_name.length() == 0 || stock_val.length() == 0) { showMsg("Stock name and value have to be present to enter a new value"); return; showMsg("Stock " + stock_name + " set to " + val); showMsg("Getting all stocks:"); rsp_list=disp.callRemoteMethods(null, "getAllStocks", (Object[])null, (Class[])null, showMsg("No stocks found"); return; clearMsg(); listbox.removeAll();
public static void main(String args[]) { QuoteClient client=new QuoteClient(); client.start(); }
public QuoteClient() { super(); try { channel=new JChannel(props); channel.setOpt(Channel.LOCAL, Boolean.FALSE); disp=new RpcDispatcher(channel, null, this, this); channel.connect(channel_name); } catch(Exception e) { System.err.println("QuoteClient(): " + e); } addWindowListener(this); }
public void viewAccepted(View new_view) { setTitle("Members in " + channel_name + ": " + (new_view.size() - 1)); }
public static void main(String args[]) { QuoteClient client=new QuoteClient(); client.start(); }
public QuoteClient() { super(); try { channel=new JChannel(props); channel.setDiscardOwnMessages(true); disp=(RpcDispatcher)new RpcDispatcher(channel, this).setMembershipListener(this); channel.connect(channel_name); } catch(Exception e) { System.err.println("QuoteClient(): " + e); } addWindowListener(this); }