[Jdvb-cvs] jdvb-server/src/uk/midearth/dvb/client ClientRMI.java,1.2,1.3 ClientGUI.java,1.2,1.3
Status: Inactive
Brought to you by:
hundalz
|
From: pinder <hu...@us...> - 2006-02-19 22:18:43
|
Update of /cvsroot/jdvb/jdvb-server/src/uk/midearth/dvb/client In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9820/src/uk/midearth/dvb/client Modified Files: ClientRMI.java ClientGUI.java Log Message: good night Index: ClientGUI.java =================================================================== RCS file: /cvsroot/jdvb/jdvb-server/src/uk/midearth/dvb/client/ClientGUI.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ClientGUI.java 19 Feb 2006 16:59:30 -0000 1.2 --- ClientGUI.java 19 Feb 2006 22:18:37 -0000 1.3 *************** *** 5,8 **** --- 5,10 ---- import org.apache.log4j.Logger; + import uk.midearth.dvb.confParser.Configurator; + import java.awt.*; import java.awt.event.*; *************** *** 22,31 **** private static JButton playerButton = new JButton("Start Player Anyway"); ! /** * Serial Version UID */ private static final long serialVersionUID = 1L; ! public static Logger LOG = Logger.getLogger(ClientGUI.class); --- 24,34 ---- private static JButton playerButton = new JButton("Start Player Anyway"); ! ! /** * Serial Version UID */ private static final long serialVersionUID = 1L; ! public static Logger LOG = Logger.getLogger(ClientGUI.class); *************** *** 142,166 **** public static void main(String[] argv) { ! if (argv.length != 1) { ! System.out.println("ClientGUI usage:"); ! System.out.println(" java ClientGUI [server config file]"); ! System.exit(1); ! } ! ! SwingUtilities.invokeLater(new Runnable() { ! public void run() { ! createGUI(); } - }); ! String configFilename = argv[0]; ! log("Working on " + configFilename); ! client = new ClientRMI(configFilename); ! getChannels(); ! statusField.setText("Server playing: " + client.currentServerChannel()); ! chanList.setSelectedValue(client.currentServerChannel(), true); ! playerButton.setEnabled(true); } } --- 145,176 ---- public static void main(String[] argv) { ! try { ! if (argv.length != 1) { ! LOG.error("ClientGUI usage:"); ! LOG.error(" java ClientGUI [server config file]"); ! System.exit(1); } ! Configurator.load(argv[0]); ! ! SwingUtilities.invokeLater(new Runnable() { ! public void run() { ! createGUI(); ! } ! }); ! String configFilename = argv[0]; ! log("Working on " + configFilename); ! client = new ClientRMI(); ! getChannels(); ! ! statusField.setText("Server playing: " ! + client.currentServerChannel()); ! chanList.setSelectedValue(client.currentServerChannel(), true); ! playerButton.setEnabled(true); ! } catch (Throwable t) { ! LOG.error("Caught OVERALL exception: ", t); ! } } } Index: ClientRMI.java =================================================================== RCS file: /cvsroot/jdvb/jdvb-server/src/uk/midearth/dvb/client/ClientRMI.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ClientRMI.java 19 Feb 2006 16:59:30 -0000 1.2 --- ClientRMI.java 19 Feb 2006 22:18:37 -0000 1.3 *************** *** 26,32 **** // private ClientGUI console; ! public ClientRMI(String configFilename) { try { ! conf = new Configurator(configFilename); remoteDVB = (RemoteDVBInterface) Naming.lookup("//" + conf.get("server") + ":" + conf.get("port") --- 26,32 ---- // private ClientGUI console; ! public ClientRMI() throws Exception { try { ! conf = Configurator.getInstance(); remoteDVB = (RemoteDVBInterface) Naming.lookup("//" + conf.get("server") + ":" + conf.get("port") *************** *** 35,49 **** } catch (NotBoundException e) { ! System.out.println("ClientRMI>> Failed to bind to remote object: " ! + e); ! e.printStackTrace(); } catch (MalformedURLException e) { ! System.out.println("ClientRMI>> Malformed URL in server: " + e); ! e.printStackTrace(); } catch (RemoteException e) { ! System.out.println("ClientRMI>> Remote Exception: " + e); ! e.printStackTrace(); } catch (Exception e) { ! e.printStackTrace(); } --- 35,50 ---- } catch (NotBoundException e) { ! LOG.error("ClientRMI>> Failed to bind to remote object: " ! + e.getMessage(), e); ! throw e; } catch (MalformedURLException e) { ! LOG.error("ClientRMI>> Malformed URL in server: " + e.getMessage(), e); ! throw e; } catch (RemoteException e) { ! LOG.error("ClientRMI>> Remote Exception: " + e.getMessage(), e); ! throw e; } catch (Exception e) { ! LOG.error("General exception: ", e); ! throw e; } |