Package com.adito.agent

Examples of com.adito.agent.AgentTunnel.sendRequest()


         
          if (DefaultAgentManager.getInstance().hasActiveAgent(session)) {
          try {
            Request agentRequest = ((ApplicationService) DefaultAgentManager.getInstance().getService(ApplicationService.class)).launchApplication(launchSession);
            AgentTunnel agent = DefaultAgentManager.getInstance().getAgentBySession(launchSession.getSession());
            if (!agent.sendRequest(agentRequest, true, 60000)) {
              throw new ExtensionException(ExtensionException.AGENT_REFUSED_LAUNCH);
            }
            ByteArrayReader baw = new ByteArrayReader(agentRequest.getRequestData());
            try {
              while(true) {
View Full Code Here


    // LogonControllerFactory.getInstance().getSessionInfo(request);
    if (DefaultAgentManager.getInstance().hasActiveAgent(launchSession.getSession())) {
      try {
        Request agentRequest = ((ApplicationService) DefaultAgentManager.getInstance().getService(ApplicationService.class)).launchApplication(launchSession);
        AgentTunnel agent = DefaultAgentManager.getInstance().getAgentBySession(launchSession.getSession());
        if (!agent.sendRequest(agentRequest, true, 60000)) {
          throw new ExtensionException(ExtensionException.AGENT_REFUSED_LAUNCH);
        }
      } catch (ExtensionException ee) {
        throw ee;
      } catch (Exception e) {
View Full Code Here

    SessionInfo session = launchSession.getSession();
    if (DefaultAgentManager.getInstance().hasActiveAgent(session)) {
      try {
        Request agentRequest = ((ApplicationService) DefaultAgentManager.getInstance().getService(ApplicationService.class)).launchApplication(launchSession);
        AgentTunnel agent = DefaultAgentManager.getInstance().getAgentBySession(launchSession.getSession());
        if (!agent.sendRequest(agentRequest, true, 60000)) {
          throw new ExtensionException(ExtensionException.AGENT_REFUSED_LAUNCH);
        }
      } catch (ExtensionException ee) {
        throw ee;
      } catch (Exception e) {
View Full Code Here

        if (agentManager.hasActiveAgent(info) && info.getUser().getPrincipalName().equals(recipient.getRecipientAlias())) {
            try {
                Request request = new Request("agentMessage", msg.toByteArray());
                AgentTunnel tunnel = agentManager.getAgentBySession(info);
                if (tunnel != null) {
                    tunnel.sendRequest(request, false, 0);
                    return true;
                }
            } catch (IOException e) {
                LOG.error("Failed to send message to agent. Did it disconnect before we could send it?", e);
            }
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.