Examples of connect()


Examples of com.esri.gpt.server.csw.client.CswCatalog.connect()

 
  try {
    this.setSelectedHarvestSitePostUrl(null);
    CswCatalog cswCatalog = new CswCatalog(this.getSelectedHarvestSiteUrl(),
    this.getSelectedHarvestSiteName(), SearchConfig.getConfiguredInstance().getGptXslProfiles().getCswProfiles().getProfileById(this.getSelectedHarvestSiteProfile()));
    cswCatalog.connect();
    CswCatalogCapabilities cap = cswCatalog.getCapabilities();
    this.setSelectedHarvestSitePostUrl(cap.get_getRecordsPostURL());
    this.setSelectedHarvestSiteGetRecordUrl(cap.get_getRecordByIDGetURL());
   
  } catch (Exception e) {
View Full Code Here

Examples of com.facebook.presto.jdbc.internal.netty.channel.Channel.connect()

        if (localAddress != null) {
            ch.bind(localAddress);
        }

        // Connect.
        return ch.connect(remoteAddress);
    }

    /**
     * Attempts to bind a channel with the specified {@code localAddress}. later the channel can
     * be connected to a remoteAddress by calling {@link Channel#connect(SocketAddress)}.This method
View Full Code Here

Examples of com.findwise.hydra.mongodb.MongoConnector.connect()

        if (cmd.getJarFile() != null) {
            File f = new File(cmd.getJarFile().getFilename());

            MongoDBConnectionConfig conf = new MongoDBConnectionConfig(cmd.getJarFile().getPipelinename(), cmd.getHost(), "", "");
            MongoConnector mdc =new MongoConnector(conf.getConfiguration());
            mdc.connect();

            log.info("Uploading jar file");
            File file = new File(cmd.getJarFile().getFilename());
            mdc.getPipelineWriter().save(cmd.getJarFile().getId(), file.getName(), new FileInputStream(f));
        }
View Full Code Here

Examples of com.firefly.net.Client.connect()

public class StringLineTcpClient {
  public static void main(String[] args) {
    StringLineClientHandler handler = new StringLineClientHandler();
    Client client = new TcpClient(new StringLineDecoder(),
        new StringLineEncoder(), handler);
        Session session = client.connect("localhost", 9900);

    session.encode("hello client");
    String ret = (String)session.getResult(1000);
    System.out.println("receive[" + ret + "]");
View Full Code Here

Examples of com.firefly.net.support.SimpleTcpClient.connect()

public class SimpleTcpClientExample {
  public static void main(String[] args) {
    final SimpleTcpClient client = new SimpleTcpClient("localhost", 9900,
        new StringLineDecoder(), new StringLineEncoder());
    TcpConnection c = client.connect();
    c.send("hello client 1", new MessageReceiveCallBack() {

      @Override
      public void messageRecieved(Session session, Object obj) {
        System.out.println("con1|" + obj.toString());
View Full Code Here

Examples of com.firefly.net.support.wrap.client.SimpleTcpClient.connect()

        }
      });

    }

    TcpConnection c = client.connect().get();
    try {
      Assert.assertThat((String) c.send("hello client 2").get(), is("hello client 2"));
      Assert.assertThat((String) c.send("quit").get(), is("bye!"));
    } finally {
      c.close(false);
View Full Code Here

Examples of com.firefly.net.tcp.TcpClient.connect()

        for (int i = 0; i < LOOP; i++) {
            executorService.submit(new Runnable() {
                @Override
                public void run() {
                    final Session session = client.connect("localhost", 9900);
                    Assert.assertThat(session.isOpen(), is(true));

                    session.encode("hello client");
                    log.debug("main thread {}", Thread.currentThread().toString());
                    String ret = (String) session.getResult(1000);
View Full Code Here

Examples of com.github.dreamhead.moco.helper.MocoSocketHelper.connect()

        final SocketServer server = jsonSocketServer(file("src/test/resources/base.json"));
        running(server, new Runnable() {
            @Override
            public void run() throws Exception {
                MocoSocketHelper helper = new MocoSocketHelper(local(), server.port());
                helper.connect();
                assertThat(helper.send("foo", 3), is("bar"));
                helper.close();
            }
        });
    }
View Full Code Here

Examples of com.github.ghetolay.jwamp.jetty.WampJettyFactory.connect()

      WampJettyFactory wampFact = WampJettyFactory.getInstance();
     
      //wampFact.getSerializer().setDesiredFormat(WampSerializer.format.BINARY);
     
      wampFact.setWampParameter(new DefaultWampParameter.SimpleClientParameter(getClass().getResourceAsStream("/wamp-client.xml"), getEventListener()));
      wamp = wampFact.connect(server.getServerURI(), 1000, 1000, ReconnectPolicy.YES);
     
      waitEventResponse.start();
     
    }catch(Exception e){
      log.error("Connection Error", e);
View Full Code Here

Examples of com.github.jreddit.entity.User.connect()

      restClient.setUserAgent("bot/1.0 by name");

    // Connect the user
      User user = new User(restClient, Authentication.getUsername(), Authentication.getPassword());
    try {
      user.connect();
    } catch (IOException e1) {
      System.err.println("I/O Exception occured when attempting to connect user.");
      e1.printStackTrace();
      return;
    } catch (ParseException e1) {
View Full Code Here
TOP
Copyright © 2015 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.