@@ -0,0 +1,1640 @@
+package com.orbekk.same;%0A%0Aimport org.eclipse.jetty.server.Server;%0Aimport org.slf4j.Logger;%0Aimport org.slf4j.LoggerFactory;%0A%0Aimport com.googlecode.jsonrpc4j.JsonRpcServer;%0A%0Apublic class ClientApp %7B%0A    private Logger logger = LoggerFactory.getLogger(getClass());%0A    private Server server;%0A    %0A    public void run(int port, String networkName) %7B%0A        ConnectionManagerImpl connections = new ConnectionManagerImpl();%0A        State state = new State(networkName);%0A        Broadcaster broadcaster =%0A                BroadcasterImpl.getDefaultBroadcastRunner(connections);%0A        MasterServiceImpl master = new MasterServiceImpl(state, connections,%0A                broadcaster);%0A        ClientServiceImpl client = new ClientServiceImpl(state, connections);%0A        %0A        JsonRpcServer jsonServer = new JsonRpcServer(client, ClientService.class);%0A        server = new Server(port);%0A        RpcHandler rpcHandler = new RpcHandler(jsonServer, client);%0A        server.setHandler(rpcHandler);%0A        %0A        try %7B%0A            server.start();%0A        %7D catch (Exception e) %7B%0A            logger.error(%22Could not start jetty server: %7B%7D%22, e);%0A        %7D%0A        %0A        try %7B%0A            server.join();%0A        %7D catch (InterruptedException e) %7B%0A            logger.info(%22Received exception. Exiting. %7B%7D%22, e);%0A        %7D%0A    %7D%0A    %0A    public static void main(String%5B%5D args) %7B%0A        if (args.length %3C 1) %7B%0A            System.err.println(%22Usage: port networkName%22);%0A            System.exit(1);%0A        %7D%0A        int port = Integer.parseInt(args%5B0%5D);%0A        String networkName = args%5B1%5D;%0A        (new ClientApp()).run(port, networkName);%0A    %7D%0A%7D%0A

Add ClientApp – a server hosting a ClientService.