Examples of open()


Examples of org.apache.servicemix.document.Resource.open()

                Long idx = Long.parseLong(getURL().getPath());
                Resource res = documents.get(idx);
                if (res == null) {
                    throw new FileNotFoundException(getURL().toString());
                }
                return res.open();
            }
        };
    }

}
View Full Code Here

Examples of org.apache.servicemix.jbi.runtime.Resource.open()

                Long idx = Long.parseLong(getURL().getPath());
                Resource res = documents.get(idx);
                if (res == null) {
                    throw new FileNotFoundException(getURL().toString());
                }
                return res.open();
            }
        };
    }

}
View Full Code Here

Examples of org.apache.servicemix.store.jdbc.JdbcStoreFactory.open()

        dataSource = (DataSource) mcf.createConnectionFactory(cm);

        JdbcStoreFactory storeFactory = new JdbcStoreFactory();
        storeFactory.setDataSource(dataSource);
        storeFactory.setTransactional(true);
        store = storeFactory.open("store");
       
        jbi = new JBIContainer();
        jbi.setFlows(new Flow[] {new SedaFlow(), new JCAFlow() });
        jbi.setEmbedded(true);
        jbi.setUseMBeanServer(false);
View Full Code Here

Examples of org.apache.solr.core.DirectoryFactory.open()

        String[] dirNames = required.getParams(CoreAdminParams.INDEX_DIR);

        DirectoryFactory dirFactory = core.getDirectoryFactory();
        Directory[] dirs = new Directory[dirNames.length];
        for (int i = 0; i < dirNames.length; i++) {
          dirs[i] = dirFactory.open(dirNames[i]);
        }

        UpdateRequestProcessorChain processorChain =
                core.getUpdateProcessingChain(params.get(UpdateParams.UPDATE_PROCESSOR));
        SolrQueryRequest wrappedReq = new LocalSolrQueryRequest(core, req.getParams());
View Full Code Here

Examples of org.apache.sshd.ClientChannel.open()

            ByteArrayOutputStream out = new ByteArrayOutputStream();
            channel.setOut(out);
   
            ByteArrayOutputStream err = new ByteArrayOutputStream();
            channel.setErr(err);
            OpenFuture openFuture = channel.open();
            openFuture.await(getTimeout());
            if (openFuture.isOpened()) {
                channel.waitFor(ClientChannel.CLOSED, 0);
                result = new SshResult(command, channel.getExitStatus(),
                        new ByteArrayInputStream(out.toByteArray()),
View Full Code Here

Examples of org.apache.sshd.client.SftpClient.open()

        SftpClient sftp = session.createSftpClient();

        sftp.mkdir("target/sftp/client");

        SftpClient.Handle h = sftp.open("target/sftp/client/test.txt", EnumSet.of(SftpClient.OpenMode.Write));
        byte[] d = "0123456789\n".getBytes();
        sftp.write(h, 0, d, 0, d.length);
        sftp.write(h, d.length, d, 0, d.length);

        SftpClient.Attributes attrs = sftp.stat(h);
View Full Code Here

Examples of org.apache.sshd.client.channel.ChannelDirectTcpip.open()

        int forwardedPort = getFreePort();
        SshdSocketAddress local = new SshdSocketAddress("", forwardedPort);
        SshdSocketAddress remote = new SshdSocketAddress("localhost", echoPort);

        ChannelDirectTcpip channel = session.createDirectTcpipChannel(local, remote);
        channel.open().await();

        channel.getInvertedIn().write("Hello".getBytes());
        channel.getInvertedIn().flush();
        byte[] buf = new byte[1024];
        int n = channel.getInvertedOut().read(buf);
View Full Code Here

Examples of org.apache.sshd.client.channel.ChannelExec.open()

        }

        public Process exec(String commandName, int timeout) throws IOException {
            final ChannelExec channel = session.createExecChannel(commandName);
            channel.open().verify();
            return new Process() {
                @Override
                public OutputStream getOutputStream() {
                    return channel.getInvertedIn();
                }
View Full Code Here

Examples of org.apache.sshd.client.channel.ChannelSession.open()

      sshChannel.setIn(new ByteArrayInputStream(new byte[0]));
      sshChannel.setOut(stdout);
      sshChannel.setErr(stderr);
      try {
        sshChannel.open().await(DEFAULT_SSH_CONNECT_TIMEOUT.getTotalMilliseconds());
      } catch (Exception e) {
        ExceptionUtils.handleInterrupted(e);
        throw new SshException("Ssh error opening channel", e);
      }
View Full Code Here

Examples of org.apache.sshd.client.channel.ChannelShell.open()

        ChannelShell shell = s.createShellChannel();
        ByteArrayOutputStream out = new ByteArrayOutputStream();
        ByteArrayOutputStream err = new ByteArrayOutputStream();
        shell.setOut(out);
        shell.setErr(err);
        shell.open().await();
        int res = s.waitFor(ClientSession.CLOSED, 5000);
        assertEquals("Session should be closed", ClientSession.CLOSED | ClientSession.AUTHED, res);
        assertTrue(latch.await(1, TimeUnit.SECONDS));
        assertTrue(TestEchoShellFactory.TestEchoShell.latch.await(1, TimeUnit.SECONDS));
    }
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.