Package com.peterhi.obsolete

Source Code of com.peterhi.obsolete.AboutMeServer

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);;

    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);
    aboutMe.fireChanged("Notice 1!!!");
    aboutMe.fireChanged("Notice 2!!!");

Related Classes of com.peterhi.obsolete.AboutMeServer

Copyright © 2018 All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact