@ Path ( "{tunnel}" ) public TunnelResource getTunnel ( @ PathParam ( "tunnel" ) String tunnelUUID ) throws GuacamoleException { Map < String , UserTunnel > tunnels = session . getTunnels ( ) ; // Pull tunnel with given UUID final UserTunnel tunnel = tunnels . get ( tunnelUUID ) ; if ( tunnel == null ) throw new GuacamoleResourceNotFoundException ( "No such tunnel." ) ; // Return corresponding tunnel resource return tunnelResourceFactory . create ( tunnel ) ; }
Retrieves the tunnel having the given UUID returning a TunnelResource representing that tunnel . If no such tunnel exists an exception will be thrown .