Examples of RemoteClient


Examples of org.crsh.shell.impl.remoting.RemoteClient

    //
    if (port != null) {
      try {
        ShellFactory factory = bootstrap.getContext().getPlugin(ShellFactory.class);
        Shell shell = factory.create(null);
        RemoteClient client = new RemoteClient(port, shell);
        log.log(Level.INFO, "Callback back remote on port " + port);
        client.connect();
        client.getRunnable().run();
      }
      finally {
        bootstrap.shutdown();
      }
    }
View Full Code Here

Examples of org.rhq.enterprise.clientapi.RemoteClient

    public void execute(ClientMain client) {
        client.setTransport(null);
        client.setHost(null);
        client.setPort(0);
        RemoteClient remoteClient = client.getRemoteClient();
        if (null != remoteClient) {
            remoteClient.logout();
        }
        // this call has the side effect of setting bindings for the new remote client and its subject       
        client.setRemoteClient(null);
        client.setSubject(null);
        client.setUser(null);
View Full Code Here

Examples of org.rhq.enterprise.clientapi.RemoteClient

    public Subject execute(ClientMain client, String username, String password, String host, int port, String transport)
        throws Exception {

        //add call to different subsystem if it exists
        RemoteClient remoteClient;
        if ((subsystem != null) && (subsystem.trim().equalsIgnoreCase("WSREMOTEAPI"))) {
            remoteClient = new RemoteClient(transport, host, port, subsystem);
        } else {
            remoteClient = new RemoteClient(transport, host, port);
        }

        // in case transport was null, let the client tell us what it'll use
        client.setTransport(remoteClient.getTransport());
        client.setHost(host);
        client.setPort(port);
        client.setUser(username);
        client.setPass(password);

        Subject subject = remoteClient.login(username, password);

        String versionUpdate = remoteClient.getServerVersionUpdate();
        String version;
        //Conditionally check for and apply update/patch version details
        if ((versionUpdate != null) && (!versionUpdate.trim().isEmpty())) {
            version = remoteClient.getServerVersion() + " " + versionUpdate + " ("
                + remoteClient.getServerBuildNumber() + ")";
        } else {
            version = remoteClient.getServerVersion() + " (" + remoteClient.getServerBuildNumber() + ")";
        }

        client.getPrintWriter().println("Remote server version is: " + version);

        // this call has the side effect of setting bindings for the new remote client and its subject
View Full Code Here

Examples of org.rhq.enterprise.clientapi.RemoteClient

            FileUtil.purge(tmpDir, true);
        }
    }
   
    public void canLocateScripts() throws Exception {
        RemoteClient client = Mockito.mock(RemoteClient.class);
       
        //this is akin to what the remote client actually returns as the remote URI
        URI remoteURI = new URI("socket://localhost:7080");
        Mockito.when(client.getRemoteURI()).thenReturn(remoteURI);
       
        URI real = tmpDir.toURI().resolve("downloads/script-modules/test-script.js");
       
        RhqDownloadsScriptSourceProvider provider = new RhqDownloadsScriptSourceProvider();
View Full Code Here

Examples of railo.runtime.config.RemoteClient

          pd.setServer(proxyServer);
          if(!StringUtil.isEmpty(proxyUsername))pd.setUsername(proxyUsername);
          if(!StringUtil.isEmpty(proxyPassword))pd.setPassword(proxyPassword);
          if(proxyPort!=-1)pd.setPort(proxyPort);
     
      RemoteClient client = new RemoteClientImpl(
          getString("admin",action,"label"),
          type==TYPE_WEB?"web":"server",
          getString("admin",action,"url"),
          getString("serverUsername",null),
          getString("serverPassword",null),
View Full Code Here

Examples of railo.runtime.config.RemoteClient

  private void doGetRemoteClient() throws PageException {
       
        String url=getString("admin",action,"url");
        RemoteClient[] clients = config.getRemoteClients();
        RemoteClient client;
        for(int i=0;i<clients.length;i++) {
          client=clients[i];
           
            if(client.getUrl().equalsIgnoreCase(url)) {
                Struct sct=new StructImpl();
                ProxyData pd = client.getProxyData();
                sct.setEL("label",client.getLabel());
                sct.setEL("usage",client.getUsage());
                sct.setEL("securityKey",client.getSecurityKey());
                sct.setEL("adminPassword",client.getAdminPassword());
                sct.setEL("ServerUsername",client.getServerUsername());
                sct.setEL("ServerPassword",client.getServerPassword());
                sct.setEL("type",client.getType());
                sct.setEL("url",client.getUrl());
                sct.setEL("proxyServer",pd==null?"":StringUtil.emptyIfNull(pd.getServer()));
                sct.setEL("proxyUsername",pd==null?"":StringUtil.emptyIfNull(pd.getUsername()));
                sct.setEL("proxyPassword",pd==null?"":StringUtil.emptyIfNull(pd.getPassword()));
                sct.setEL("proxyPort",pd==null?"":(pd.getPort()==-1?"":Caster.toString(pd.getPort())));
               
View Full Code Here

Examples of railo.runtime.config.RemoteClient

    return exp;
  }

  private void doGetRemoteClients() throws PageException {
        RemoteClient[] clients = config.getRemoteClients();
        RemoteClient client;
        ProxyData pd;
        railo.runtime.type.Query qry=new QueryImpl(new String[]{"label","usage","securityKey","adminPassword","serverUsername","serverPassword","type","url",
            "proxyServer","proxyUsername","proxyPassword","proxyPort"},clients.length,"query");
       
        int row=0;

        for(int i=0;i<clients.length;i++) {
            client=clients[i];
            pd=client.getProxyData();
            row=i+1;
            qry.setAt("label",row,client.getLabel());
            qry.setAt("usage",row,client.getUsage());
            qry.setAt("securityKey",row,client.getSecurityKey());
            qry.setAt("adminPassword",row,client.getAdminPassword());
            qry.setAt("ServerUsername",row,client.getServerUsername());
            qry.setAt("ServerPassword",row,client.getServerPassword());
            qry.setAt("type",row,client.getType());
            qry.setAt("url",row,client.getUrl());
            qry.setAt("proxyServer",row,pd==null?"":pd.getServer());
            qry.setAt("proxyUsername",row,pd==null?"":pd.getUsername());
            qry.setAt("proxyPassword",row,pd==null?"":pd.getPassword());
            qry.setAt("proxyPort",row,pd==null?"":Caster.toString(pd.getPort()));
           
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.