package com.peterhi.obsolete;
import java.util.ArrayList;
import com.peterhi.obsolete.MultithreadedRudpLocalEndpoint;
import com.peterhi.obsolete.RemoteRegistry;
import com.peterhi.obsolete.RudpLocalEndpoint;
public class AboutMeServer {
public static void main(String[] args) throws Exception {
RudpLocalEndpoint endpoint = new MultithreadedRudpLocalEndpoint(22222);
RemoteRegistry registry = new RemoteRegistry(endpoint);
endpoint.run();
ArrayList<String> friendNames = new ArrayList<String>();
for (int i = 0; i < 100; i++) {
friendNames.add("Friend " + i);
}
AboutMeImpl aboutMe = new AboutMeImpl(registry, "Jason", "True name is YZW.", friendNames);
registry.register("aboutMe", aboutMe);
Thread.sleep(5000);
aboutMe.fireChanged("Notice 1!!!");
Thread.sleep(5000);
aboutMe.fireChanged("Notice 2!!!");
}
}