Package org.glyptodon.guacamole

Examples of org.glyptodon.guacamole.GuacamoleResourceNotFoundException


        // Try to parse the connectionID if it's not the root group
        if(!MySQLConstants.CONNECTION_GROUP_ROOT_IDENTIFIER.equals(uniqueIdentifier)) {
            try {
                connectionGroupID = Integer.parseInt(uniqueIdentifier);
            } catch(NumberFormatException e) {
                throw new GuacamoleResourceNotFoundException("Invalid connection group ID.");
            }
        }
       
        return retrieveConnectionGroup(connectionGroupID, userID);
    }
View Full Code Here


            // Get the least used connection.
            Integer leastUsedConnectionID =
                    activeConnectionMap.getLeastUsedConnection(connectionIDs);
           
            if(leastUsedConnectionID == null)
                throw new GuacamoleResourceNotFoundException("No connections found in group.");
           
            if(GuacamoleProperties.getProperty(
                    MySQLGuacamoleProperties.MYSQL_DISALLOW_SIMULTANEOUS_CONNECTIONS, false)
                    && activeConnectionMap.isActive(leastUsedConnectionID))
                throw new GuacamoleServerBusyException
View Full Code Here

        // Get connection
        MySQLConnection mySQLConnection =
                connectionService.retrieveConnection(identifier, user_id);
       
        if(mySQLConnection == null)
            throw new GuacamoleResourceNotFoundException("Connection not found.");
       
        // Verify permission to use the parent connection group for organizational purposes
        permissionCheckService.verifyConnectionGroupUsageAccess
                (mySQLConnection.getParentID(), user_id, MySQLConstants.CONNECTION_GROUP_ORGANIZATIONAL);
View Full Code Here

        // Get connection
        MySQLConnection mySQLConnection =
                connectionService.retrieveConnection(identifier, user_id);
       
        if(mySQLConnection == null)
            throw new GuacamoleResourceNotFoundException("Connection not found.");

        // Verify permission to update the connection
        permissionCheckService.verifyConnectionAccess(this.user_id,
                mySQLConnection.getConnectionID(),
                MySQLConstants.CONNECTION_UPDATE);
View Full Code Here

        // Get connection
        MySQLConnectionGroup mySQLConnectionGroup =
                connectionGroupService.retrieveConnectionGroup(identifier, user_id);
       
        if(mySQLConnectionGroup == null)
            throw new GuacamoleResourceNotFoundException("Connection group not found.");
       
        // Verify permission to use the parent connection group for organizational purposes
        permissionCheckService.verifyConnectionGroupUsageAccess
                (mySQLConnectionGroup.getParentID(), user_id, MySQLConstants.CONNECTION_GROUP_ORGANIZATIONAL);
View Full Code Here

        // Get connection group
        MySQLConnectionGroup mySQLConnectionGroup =
                connectionGroupService.retrieveConnectionGroup(identifier, user_id);
       
        if(mySQLConnectionGroup == null)
            throw new GuacamoleResourceNotFoundException("Connection group not found.");

        // Verify permission to update the connection
        permissionCheckService.verifyConnectionAccess(this.user_id,
                mySQLConnectionGroup.getConnectionGroupID(),
                MySQLConstants.CONNECTION_GROUP_UPDATE);
View Full Code Here

                }

                // Failed to connect
                else
                    throw new GuacamoleResourceNotFoundException("No tunnel created.");

            }

            // If read operation, call doRead() with tunnel UUID, ignoring any
            // characters following the tunnel UUID.
View Full Code Here

        GuacamoleSession session = new GuacamoleSession(httpSession);

        // Get tunnel, ensure tunnel exists
        GuacamoleTunnel tunnel = session.getTunnel(tunnelUUID);
        if (tunnel == null)
            throw new GuacamoleResourceNotFoundException("No such tunnel.");

        // Ensure tunnel is open
        if (!tunnel.isOpen())
            throw new GuacamoleResourceNotFoundException("Tunnel is closed.");

        // Obtain exclusive read access
        GuacamoleReader reader = tunnel.acquireReader();

        try {
View Full Code Here

        HttpSession httpSession = request.getSession(false);
        GuacamoleSession session = new GuacamoleSession(httpSession);

        GuacamoleTunnel tunnel = session.getTunnel(tunnelUUID);
        if (tunnel == null)
            throw new GuacamoleResourceNotFoundException("No such tunnel.");

        // We still need to set the content type to avoid the default of
        // text/html, as such a content type would cause some browsers to
        // attempt to parse the result, even though the JavaScript client
        // does not explicitly request such parsing.
View Full Code Here

    private void decrementUserCount(int connectionID)
            throws GuacamoleException {
        Connection connection = activeConnectionMap.get(connectionID);
       
        if(connection == null)
            throw new GuacamoleResourceNotFoundException
                    ("Connection to decrement does not exist.");
       
        // Decrement the current user count
        connection.setCurrentUserCount(connection.getCurrentUserCount() - 1);
    }
View Full Code Here

TOP

Related Classes of org.glyptodon.guacamole.GuacamoleResourceNotFoundException

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.