Examples of connect()


Examples of org.apache.sshd.SshClient.connect()

    try {
      SshClient client = sshContext.client;

      System.out.println("New SSH connection to " + connectionInfo.getHost());

      ConnectFuture connect = client.connect(connectionInfo.getSocketAddress());
      if (!connect.await(connectTimeout.getTotalMilliseconds())) {
        connect.cancel();
        throw new SshException("Timeout while waiting for SSH connection to " + connectionInfo.getHost());
      }
View Full Code Here

Examples of org.apache.tomcat.jni.socket.AprSocket.connect()

        AprSocket ch = con.socket(host, port, ctx.tls);

        spdy.setSocket(ch);

        ch.connect();

        ch.setHandler(new SpdySocketHandler(spdy));

        // need to consume the input to receive more read events
        int rc = spdy.processInput();
View Full Code Here

Examples of org.apache.tuscany.core.builder.ConnectorImpl.connect()

        AtomicComponent sourceComponent = builder.build(parent, sourceComponentDefinition, deploymentContext);
        Reference reference = bindingBuilder.build(parent, targetReferenceDefinition, deploymentContext);

        parent.register(sourceComponent);
        parent.register(reference);
        connector.connect(reference.getInboundWire(), reference.getOutboundWire(), true);
        connector.connect(sourceComponent);
        grandParent.register(parent);
        grandParent.start();
        scope.onEvent(new CompositeStart(this, parent));
        Source source = (Source) parent.getSystemChild("source").getServiceInstance();
View Full Code Here

Examples of org.apache.tuscany.core.builder.impl.DefaultWireBuilder.connect()

        // connect the source to the target
        DefaultWireBuilder builder = new DefaultWireBuilder();
        builder.addWireBuilder(new JavaTargetWireBuilder());
       
        builder.connect(sourceFactory, targetFactory, JavaContextFactory.class, true, scopeCtx);
        source.build();
        target.build();
        Assert.assertNotNull(source.getTargetInvoker());
       
        Message msg = msgFactory.createMessage();
View Full Code Here

Examples of org.apache.tuscany.spi.builder.Connector.connect()

        Service service =
            new ServiceExtension("fooService", TestBean.class, composite, createWireService());
        service.setInboundWire(inboundWire);
        service.setOutboundWire(outboundWire);
        Connector connector = ArtifactFactory.createConnector();
        connector.connect(inboundWire, outboundWire, true);
        for (InboundInvocationChain chain : inboundWire.getInvocationChains().values()) {
            chain.setTargetInvoker(composite.createTargetInvoker("foo", chain.getOperation()));
        }
        composite.register(service);
        TestBean serviceInstance = (TestBean) composite.getService("fooService").getServiceInstance();
View Full Code Here

Examples of org.apache.uima.collection.impl.cpm.container.deployer.VinciTAP.connect()

    boolean tryAgain = true;
    int maxCount = aCasProcessorConfig.getMaxRestartCount();
    while (tryAgain) {
      try {
        // Connect proxy to service running on given port on the same machine as the CPM
        tap.connect(aHost, aPort);
        // Connection established no need to retry
        tryAgain = false;
      } catch (Exception e) {
        if (maxCount-- == 0) {
          e.printStackTrace();
View Full Code Here

Examples of org.apache.vysper.xmpp.server.s2s.XMPPServerConnectorRegistry.connect()

    private static final Stanza STANZA = XMPPCoreStanza.getWrapper(StanzaBuilder.createMessageStanza(FROM, TO, LANG,
            BODY).build());

    public void testRemoteServerError() throws Exception {
        XMPPServerConnectorRegistry registry = Mockito.mock(XMPPServerConnectorRegistry.class);
        Mockito.when(registry.connect(SERVER)).thenThrow(new RemoteServerNotFoundException());

        ServerRuntimeContext serverRuntimeContext = Mockito.mock(ServerRuntimeContext.class);
        Mockito.when(serverRuntimeContext.getServerConnectorRegistry()).thenReturn(registry);

        DeliveringExternalInboundStanzaRelay relay = new DeliveringExternalInboundStanzaRelay(new TestExecutorService());
View Full Code Here

Examples of org.atomojo.app.db.DB.connect()

                  DB db = new DB(getLogger(),new File(dbDir,dbName));
                  dbinfo = new DBInfo(dbName,db,auth,groupT!=null ?  groupT.getFirstValue() : null, aliasT!=null ? aliasT.getFirstValue() : null);
                  storage = storageFactory.getStorage(db);
                  try {
                     getLogger().info("Connecting to DB "+dbName);
                     db.connect();
                     getLogger().info("Connected to DB "+dbName);
                     autodbList.put(dbName,dbinfo);
                     storage.start();
                  } catch (SQLException ex) {
                     getLogger().log(Level.SEVERE,"Cannot connect to database "+dbName,ex);
View Full Code Here

Examples of org.axonframework.commandhandling.distributed.jgroups.JGroupsConnector.connect()

        // Register the Command Handlers with the command bus using the annotated methods of the object.
        AnnotationCommandHandlerAdapter.subscribe(new ToDoLoggingCommandHandler(), commandBus);

        // Start the connection to the distributed command bus
        connector.connect(loadFactor);

        // Load the amount of times to send the commands from the command line or use default 1
        Integer numberOfCommandLoops = determineNumberOfCommandLoops();

        // and let's send some Commands on the CommandBus.
View Full Code Here

Examples of org.beangle.db.replication.wrappers.DatabaseWrapper.connect()

      props.load(is);
    } catch (IOException e) {
      throw new RuntimeException("cannot find database.properties");
    }
    DatabaseWrapper source = new DatabaseWrapper(props.getProperty("source.schema"));
    source.connect(DataSourceUtil.getDataSource("source"), (Dialect) (Class.forName(props
        .getProperty("source.dialect")).newInstance()));

    DatabaseWrapper target = new DatabaseWrapper(props.getProperty("target.schema"));
    target.connect(DataSourceUtil.getDataSource("target"), (Dialect) (Class.forName(props
        .getProperty("target.dialect")).newInstance()));
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.