test.ca.odell.glazedlists.io.SwingListPeer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of glazedlists_java15 Show documentation
Show all versions of glazedlists_java15 Show documentation
Event-driven lists for dynamically filtered and sorted tables
/* Glazed Lists (c) 2003-2006 */
/* http://publicobject.com/glazedlists/ publicobject.com,*/
/* O'Dell Engineering Ltd.*/
package ca.odell.glazedlists.io;
import java.io.IOException;
/**
* A peer that publishes and subscribes to lists.
*
* @author Jesse Wilson
*/
public class SwingListPeer {
/**
* When started via a main method, this creates a standalone issues browser.
*/
public static void main(String[] args) throws IOException {
if(args.length != 2 && args.length != 4) {
System.out.println("Usage: SwingListPeer [ ]");
return;
}
String localHost = args[0];
int localPort = Integer.parseInt(args[1]);
ListPeer peer = new ListPeer(localPort);
peer.start();
// start the publisher
if(args.length >= 2) {
new PublishFrame(peer, localHost, localPort, "/slp");
}
// start the subscriber
if(args.length >= 4) {
String targetHost = args[2];
int targetPort = Integer.parseInt(args[3]);
new SubscribeFrame(peer, targetHost, targetPort, "/slp");
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy