Package com.maverick.multiplex

Examples of com.maverick.multiplex.MultiplexedConnection


        CoreServlet.getServlet().fireCoreEvent(evt);
       
        VariableReplacement replacer = new VariableReplacement();
        replacer.setLaunchSession(launchSession);
        URL url = new URL(replacer.replace(wf.getDestinationURL()));
        MultiplexedConnection agent = DefaultAgentManager.getInstance().getAgentBySession(getSessionInfo(request));
        int port = DefaultAgentManager.getInstance().openURL((AgentTunnel)agent, url, launchSession);
        if(port == -1) {
          throw new Exception("Agent couldn't open tunnel.");
        }
       
View Full Code Here


   *      int, java.lang.String, java.lang.String)
   */
  public void init() throws SecurityException, IOException {

        // Create connection object now so users of API can add connection listeners before connecting
      con = new MultiplexedConnection(new AgentChannelFactory(
                this));
       
    // #ifdef DEBUG
    log.info("Allow untrusted hosts is set to " + System.getProperty("com.maverick.ssl.allowUntrustedCertificates", "false")); //$NON-NLS-1$ //$NON-NLS-2$
    log.info("Cache directory is " + getConfiguration().getCacheDir());
View Full Code Here

        client.setCredentials(new PasswordCredentials("lee", "xxxxxxxxxx"));
        client.setPreemtiveAuthentication(true);
       
        HttpResponse response = client.execute(get);
       
        c = new MultiplexedConnection(new SocketChannelFactory());

            c.startProtocol(response.getConnection().getInputStream(), response.getConnection().getOutputStream(), false);

        } catch (Exception ex) {
            ex.printStackTrace();
View Full Code Here

     

     
    Socket socket = new Socket("127.0.0.1", 10000);

    MultiplexedConnection c = new MultiplexedConnection(null);

    SocketChannel channel = new SocketChannel(socket, "cvs.3sp.co.uk", 22);

    c.openChannel(channel);

    channel.getOutputStream().write("SSH-2.0-foobar\r\n".getBytes());

    byte[] id = new byte[255];
View Full Code Here

            throw new TunnelException(TunnelException.INTERNAL_ERROR, (Throwable)null, "No agent.");
        }

        Tunnel tunnel = (Tunnel) launchSession.getResource();
        launchSession.checkAccessRights(null, agent.getSession());
        MultiplexedConnection agent = DefaultAgentManager.getInstance().getAgentBySession(launchSession.getSession());

        try {
            if (tunnel.getType() == TransportType.LOCAL_TUNNEL_ID) {
                Collection<Tunnel> l = new ArrayList<Tunnel>();
                l.add(tunnel);
View Full Code Here

     * @return resource IDs of active tunnels
     */
    public Set<Integer> getActiveTunnels(SessionInfo session) {

        try {
            MultiplexedConnection tunnel = DefaultAgentManager.getInstance().getAgentBySession(session);

            if (tunnel == null)
                return null;

            HashSet<Integer> activeTunnelIds = new HashSet<Integer>();

            // The agent keeps track of 'local' tunnels

            Request request = new Request(ACTIVE_LOCAL_TUNNELS);
            if (tunnel.sendRequest(request, true) && request.getRequestData()!=null) {

                ByteArrayReader reader = new ByteArrayReader(request.getRequestData());
                int count = (int) reader.readInt();
                for (int i = 0; i < count; i++) {
                    activeTunnelIds.add(new Integer((int) reader.readInt()));
View Full Code Here

TOP

Related Classes of com.maverick.multiplex.MultiplexedConnection

Copyright © 2018 www.massapicom. 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.