code: @Path("activeConnection")
      public DirectoryObjectResource<ActiveConnection, APIActiveConnection>
          getActiveConnection() throws GuacamoleException {
  
          // Pull the UserContext from the tunnel
          UserContext userContext = tunnel.getUserContext();
  
          // Fail if the active connection cannot be found
          ActiveConnection activeConnection = tunnel.getActiveConnection();
          if (activeConnection == null)
              throw new GuacamoleResourceNotFoundException("No readable active connection for tunnel.");
  
          // Return the associated ActiveConnection as a resource
          return activeConnectionResourceFactory.create(userContext,
                  userContext.getActiveConnectionDirectory(), activeConnection);
  
      }
docs: Retrieves a resource representing the ActiveConnection object associated
  with this tunnel.
  
  @return
  A resource representing the ActiveConnection object associated with
  this tunnel.
  
  @throws GuacamoleException
  If an error occurs while retrieving the ActiveConnection.