Package com.maverick.util

Examples of com.maverick.util.ByteArrayWriter.writeInt()


    }

    public byte[] create() throws IOException {
        ByteArrayWriter msg = new ByteArrayWriter();
        msg.writeString(launchSession == null ? "" : launchSession.getId());
        msg.writeInt(tunnel.getResourceId());
        msg.writeString(tunnel.getResourceName());
        msg.writeInt(tunnel.getType());
        msg.writeString(tunnel.getTransport());
        msg.writeString(tunnel.getSourceInterface());
        msg.writeInt(tunnel.getSourcePort());
View Full Code Here


    public byte[] create() throws IOException {
        ByteArrayWriter msg = new ByteArrayWriter();
        msg.writeString(launchSession == null ? "" : launchSession.getId());
        msg.writeInt(tunnel.getResourceId());
        msg.writeString(tunnel.getResourceName());
        msg.writeInt(tunnel.getType());
        msg.writeString(tunnel.getTransport());
        msg.writeString(tunnel.getSourceInterface());
        msg.writeInt(tunnel.getSourcePort());
        msg.writeInt(tunnel.getDestination().getPort());
        msg.writeString(tunnel.getDestination().getHost());
View Full Code Here

        msg.writeInt(tunnel.getResourceId());
        msg.writeString(tunnel.getResourceName());
        msg.writeInt(tunnel.getType());
        msg.writeString(tunnel.getTransport());
        msg.writeString(tunnel.getSourceInterface());
        msg.writeInt(tunnel.getSourcePort());
        msg.writeInt(tunnel.getDestination().getPort());
        msg.writeString(tunnel.getDestination().getHost());
        msg.writeBoolean(false);
        return msg.toByteArray();
    }
View Full Code Here

        msg.writeString(tunnel.getResourceName());
        msg.writeInt(tunnel.getType());
        msg.writeString(tunnel.getTransport());
        msg.writeString(tunnel.getSourceInterface());
        msg.writeInt(tunnel.getSourcePort());
        msg.writeInt(tunnel.getDestination().getPort());
        msg.writeString(tunnel.getDestination().getHost());
        msg.writeBoolean(false);
        return msg.toByteArray();
    }
View Full Code Here

     
      ByteArrayWriter msg = new ByteArrayWriter();
     
      try {
       
        msg.writeInt(tunnel.getResourceId());
        msg.writeString(tunnel.getSourceInterface());
        msg.writeString(launchSession.getId());
        msg.writeString(tunnel.getSourceInterface());
        msg.writeInt(tunnel.getSourcePort());
        msg.writeString(destHost);
View Full Code Here

       
        msg.writeInt(tunnel.getResourceId());
        msg.writeString(tunnel.getSourceInterface());
        msg.writeString(launchSession.getId());
        msg.writeString(tunnel.getSourceInterface());
        msg.writeInt(tunnel.getSourcePort());
        msg.writeString(destHost);
        msg.writeInt(tunnel.getDestination().getPort());
       
       
        Request request = new Request(TunnelingService.START_REMOTE_TUNNEL, msg.toByteArray());
View Full Code Here

        msg.writeString(tunnel.getSourceInterface());
        msg.writeString(launchSession.getId());
        msg.writeString(tunnel.getSourceInterface());
        msg.writeInt(tunnel.getSourcePort());
        msg.writeString(destHost);
        msg.writeInt(tunnel.getDestination().getPort());
       
       
        Request request = new Request(TunnelingService.START_REMOTE_TUNNEL, msg.toByteArray());
        agent.sendRequest(request, false);
       
View Full Code Here

              }
          }
         
          // Send the list of resource IDs and names back to the agent
          ByteArrayWriter response = new ByteArrayWriter();
          response.writeInt(filteredResources.size());
          for (Resource resource : filteredResources) {
            response.writeInt(resource.getResourceId());
            response.writeString(resource.getResourceDisplayName());
          }
          request.setRequestData(response.toByteArray());
View Full Code Here

         
          // Send the list of resource IDs and names back to the agent
          ByteArrayWriter response = new ByteArrayWriter();
          response.writeInt(filteredResources.size());
          for (Resource resource : filteredResources) {
            response.writeInt(resource.getResourceId());
            response.writeString(resource.getResourceDisplayName());
          }
          request.setRequestData(response.toByteArray());
          return true;
        }
View Full Code Here

    }
   
    private boolean send(Message message, Recipient recipient, SessionInfo info) throws IOException {
        ByteArrayWriter msg = new ByteArrayWriter();
        msg.writeString(message.getSubject());
        msg.writeInt(0);
        msg.writeString(message.getContent());

        DefaultAgentManager agentManager = DefaultAgentManager.getInstance();
        if (agentManager.hasActiveAgent(info) && info.getUser().getPrincipalName().equals(recipient.getRecipientAlias())) {
            try {
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.