@ 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 ) ; }
Retrieves a resource representing the ActiveConnection object associated with this tunnel .