Examples of Destination


Examples of org.eclipse.jetty.client.api.Destination

        client.GET(scheme + "://" + host + ":" + port);

        List<Destination> destinations = client.getDestinations();
        Assert.assertNotNull(destinations);
        Assert.assertEquals(1, destinations.size());
        Destination destination = destinations.get(0);
        Assert.assertNotNull(destination);
        Assert.assertEquals(scheme, destination.getScheme());
        Assert.assertEquals(host, destination.getHost());
        Assert.assertEquals(port, destination.getPort());
    }
View Full Code Here

Examples of org.glassfish.jersey.examples.rx.domain.Destination

        }

        return Lists.transform(VISITED.get(user), new Function<String, Destination>() {
            @Override
            public Destination apply(final String input) {
                return new Destination(input);
            }
        });
    }
View Full Code Here

Examples of org.jboss.dna.graph.io.Destination

            // The node types will be loaded into 'dna:repositories/{repositoryName}/dna:nodeTypes/' ...
            Path nodeTypesPath = subpath(JcrLexicon.NODE_TYPES);
            createIfMissing(JcrLexicon.NODE_TYPES).and();

            // Now set up the destination, but make it so that ...
            Destination destination = new GraphBatchDestination(batch, true); // will NOT be executed

            // And create the importer that will load the CND content into the repository ...
            return new CndImporter(destination, nodeTypesPath);
        }
View Full Code Here

Examples of org.mage.plugins.card.dl.DownloadJob.Destination

                if(job.getState() != State.NEW) return;
                job.setState(State.WORKING);
            }
            try {
                Source src = job.getSource();
                Destination dst = job.getDestination();
                BoundedRangeModel progress = job.getProgress();
               
                if(dst.exists()) {
                    progress.setMaximum(1);
                    progress.setValue(1);
                } else {
                    progress.setMaximum(src.length());
                    InputStream is = new BufferedInputStream(src.open());
                    try {
                        OutputStream os = new BufferedOutputStream(dst.open());
                        try {
                            byte[] buf = new byte[8 * 1024];
                            int total = 0;
                            for(int len; (len = is.read(buf)) != -1;) {
                                if(job.getState() == State.ABORTED) throw new IOException("Job was aborted");
                                progress.setValue(total += len);
                                os.write(buf, 0, len);
                            }
                        } catch(IOException ex) {
                            try {
                                dst.delete();
                            } catch(IOException ex1) {
                                log.warn("While deleting", ex1);
                            }
                            throw ex;
                        } finally {
View Full Code Here

Examples of org.objectweb.joram.client.jms.Destination

  }

  /** return the appropriate destination of cluster */
  protected Destination getDestination() {
    if ((cluster != null) && ! cluster.isEmpty()) {
      Destination dest = null;
      String location = System.getProperty("location");
      if (location == null || location.equals("")) {
        int idx = new Random().nextInt(cluster.size());

        Object key[] = cluster.keySet().toArray();
View Full Code Here

Examples of org.objectweb.joram.client.jms.Destination

    return getDestination().getType();
  }

  public void setReader(User user) throws ConnectException, AdminException {
    for (Enumeration dests = cluster.elements(); dests.hasMoreElements();) {
      Destination dest = (Destination) dests.nextElement();
      getWrapper().doRequest(new SetReader(user.getProxyId(), dest.getName()));
    }
  }
View Full Code Here

Examples of org.objectweb.joram.client.jms.Destination

    }
  }

  public void setWriter(User user) throws ConnectException, AdminException {
    for (Enumeration dests = cluster.elements(); dests.hasMoreElements();) {
      Destination dest = (Destination) dests.nextElement();
      getWrapper().doRequest(new SetWriter(user.getProxyId(), dest.getName()));
    }
  }
View Full Code Here

Examples of org.objectweb.joram.client.jms.Destination

    }
  }
 
  public void setFreeReading() throws ConnectException, AdminException {
    for (Enumeration dests = cluster.elements(); dests.hasMoreElements();) {
      Destination dest = (Destination) dests.nextElement();
      getWrapper().doRequest(new SetReader(null, dest.getName()));
    }
  }
View Full Code Here

Examples of org.objectweb.joram.client.jms.Destination

    }
  }

  public void setFreeWriting() throws ConnectException, AdminException {
    for (Enumeration dests = cluster.elements(); dests.hasMoreElements();) {
      Destination dest = (Destination) dests.nextElement();
      getWrapper().doRequest(new SetWriter(null, dest.getName()));
    }
  }
View Full Code Here

Examples of org.objectweb.joram.client.jms.Destination

    for (int i=0; i<entries.length; i++) {
      strbuf.setLength(0);
      strbuf.append("cluster#").append(i).append(".key");
      ref.add(new StringRefAddr(strbuf.toString(),
                                (String) entries[i].getKey()));
      Destination dest = (Destination) entries[i].getValue();

      strbuf.setLength(0);
      strbuf.append("cluster#").append(i).append(".destName");
      ref.add(new StringRefAddr(strbuf.toString(), dest.getName()));
    }
  }
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.