Examples of registerService()


Examples of io.fabric8.dosgi.tcp.ServerInvokerImpl.registerService()

        ClientInvokerImpl client = new ClientInvokerImpl(queue, map);
        client.start();

        try {
            server.registerService("service-id", new ServerInvoker.ServiceFactory() {
                public Object get() {
                    return new HelloImpl();
                }
                public void unget() {
                }
View Full Code Here

Examples of it.baeyens.arduino.arduino.Serial.registerService()

    public void connectSerial(String ComPort, int BaudRate) {
  if (mySerialConnections.size() < myMaxSerialPorts) {
      int colorindex = mySerialConnections.size();
      Serial newSerial = new Serial(ComPort, BaudRate);
      if (newSerial.IsConnected()) {
    newSerial.registerService();
    SerialListener theListener = new SerialListener(this, colorindex);
    newSerial.addListener(theListener);
    theListener.event(System.getProperty("line.separator") + "Connected to " + ComPort + " at " + BaudRate
      + System.getProperty("line.separator"));
    mySerialConnections.put(newSerial, theListener);
View Full Code Here

Examples of javax.jmdns.JmDNS.registerService()

      String url = String.format("http://%s:%d", urlaux, local.getPort());

      // Register a local machine
      logger.info("publishing machine {} on the mdns bus", url);

      jmDNS.registerService(ServiceInfo.create(local.getType(),
        local.getName(), local.getPort(), url));

  }

    }
View Full Code Here

Examples of javax.jmdns.JmDNS.registerService()

                if (props == null) {
                    props = new Hashtable();
                }
                props.put(argv[i].substring(0, j), argv[i].substring(j+1));
            }
            jmdns.registerService(ServiceInfo.create(type, name, Integer.parseInt(argv[4]), 0, 0, props));
           
            // This while loop keeps the main thread alive
            while (true) {
                try {
                    Thread.sleep(Integer.MAX_VALUE);
View Full Code Here

Examples of javax.jmdns.JmDNS.registerService()

            System.out.println("Opened JmDNS");
            System.out.println("\nPress r and Enter, to register HTML service 'foo'");
            int b;
            while ((b = System.in.read()) != -1 && (char) b != 'r');
            ServiceInfo info = ServiceInfo.create("_http._tcp.local.", "foo", 1268, 0, 0, "path=index.html");
            jmdns.registerService(info);
           
            System.out.println("\nRegistered Service as "+info);
            System.out.println("Press q and Enter, to quit");
            //int b;
            while ((b = System.in.read()) != -1 && (char) b != 'q');
View Full Code Here

Examples of javax.jmdns.JmDNS.registerService()

        JmDNS jmdns = JmDNS.create();
        VanillaRmiServer<Object> newServer = Proxies.newServer("XXX", 12345, new Object());

        final ServiceInfo service = ServiceInfo.create(".jo", "asdkjsah", 12345, 0, 0, "asdjk");

        jmdns.registerService(service);

        System.out.println("1");
        newServer.close();
        System.out.println("2");
View Full Code Here

Examples of javax.jmdns.JmDNS.registerService()

        JmDNS jmdns = JmDNS.create();

        System.out.println("Create");
        final ServiceInfo service = ServiceInfo.create("_httpx._tcp.local.", "Port@" + port, port, 0, 0, ":-)");
        System.out.println("Register");
        jmdns.registerService(service);

        for (int i = 0; i < 10; i++) {
            System.out.println("Query:");
            ServiceInfo[] list = jmdns.list("_httpx._tcp.local.");
            for (ServiceInfo serviceInfo : list) {
View Full Code Here

Examples of javax.jmdns.JmDNS.registerService()

                                dns.registerServiceType(type);
                            }
                            // Register services
                            for (ServiceInfo info : infos) {
                                try {
                                    dns.registerService(info.clone());
                                } catch (IOException exception) {
                                    // logger.warning("Unexpected unhandled exception: " + exception);
                                }
                            }
                            // Add ServiceType Listeners
View Full Code Here

Examples of javax.jmdns.JmDNS.registerService()

    public void testRegisterService() throws IOException {
        System.out.println("Unit Test: testRegisterService()");
        JmDNS registry = null;
        try {
            registry = JmDNS.create();
            registry.registerService(service);
        } finally {
            if (registry != null) registry.close();
        }
    }
View Full Code Here

Examples of javax.jmdns.JmDNS.registerService()

    public void testUnregisterService() throws IOException, InterruptedException {
        System.out.println("Unit Test: testUnregisterService()");
        JmDNS registry = null;
        try {
            registry = JmDNS.create();
            registry.registerService(service);

            ServiceInfo[] services = registry.list(service.getType());
            assertEquals("We should see the service we just registered: ", 1, services.length);
            assertEquals(service, services[0]);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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 coftware#gmail.com.