Package com.adito.agent.client

Examples of com.adito.agent.client.PortMonitor


        /*
         * Update the port monitor to show a remote tunnel with
         * no active connections when starting or remove it when
         * stopping
         */
        PortMonitor portMonitor = agent.getGUI().getPortMonitor();
        if(request.getRequestName().equals(START_REMOTE_TUNNEL)) {
          TunnelConfiguration conf = new DefaultTunnel(
              resourceId, TunnelConfiguration.REMOTE_TUNNEL, TunnelConfiguration.TCP_TUNNEL, listeningInterface, listeningPort, destinationPort, destinationHost, true, false, resourceName, launchId);
          RemotePortItem portItem = new RemotePortItem(conf);
          portMonitor.addPortItem(portItem);
        }
        else {
          int idx = portMonitor.getIndexForId(resourceId);
          if(idx != -1) {
            portMonitor.removeItemAt(idx);
          }
        }
       
        return true;
      } catch (IOException e) {
View Full Code Here


   * @see com.adito.agent.client.tunneling.LocalForwardingServerListener#activeTunnelStarted(com.adito.agent.client.tunneling.LocalForwardingServer,
   *      com.adito.agent.client.tunneling.ActiveTunnel)
   */
  public void localTunnelConnectionStarted(LocalTunnelServer localForwardingServer, LocalTunnelConnection activeTunnel) {
    // Update port monitor
    PortMonitor portMonitor = agent.getGUI().getPortMonitor();
    synchronized (portMonitor) {
      int idx = portMonitor.getIndexForId(localForwardingServer.getId());
      AbstractPortItem item = portMonitor.getItemAt(idx);
      item.increaseActive();
      portMonitor.updateItemAt(idx);
    }
    agent.updateInformation();
    // #ifdef DEBUG
    TunnelManager.log.info("Tunnel has been opened on " + activeTunnel.getClientHost() //$NON-NLS-1$
      + " to " + localForwardingServer.getTunnel().getDestinationHost() //$NON-NLS-1$
View Full Code Here

   *      com.adito.agent.client.tunneling.ActiveTunnel)
   */
  public void localTunnelConnectionStopped(LocalTunnelServer localForwardingServer, LocalTunnelConnection activeTunnel) {

    // Update port monitor
    PortMonitor portMonitor = agent.getGUI().getPortMonitor();
    synchronized (portMonitor) {
      int idx = portMonitor.getIndexForId(localForwardingServer.getId());
      if (idx != -1) {
        AbstractPortItem item = portMonitor.getItemAt(idx);
        item.decreaseActive();
        portMonitor.updateItemAt(idx);
      }
    }

    agent.updateInformation();

View Full Code Here

TOP

Related Classes of com.adito.agent.client.PortMonitor

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.