public GuacamoleTunnel assignGuacamoleTunnel(final GuacamoleSocket socket,
            String connectionID) {

        // Create tunnel with given socket
        this.tunnel = new AbstractGuacamoleTunnel() {

            @Override
            public GuacamoleSocket getSocket() {
                return socket;
            }
            
            @Override
            public UUID getUUID() {
                return ActiveConnectionRecord.this.getUUID();
            }

        };

        // Store connection ID of the primary connection only
        if (isPrimaryConnection())
            this.connectionID = connectionID;

        // Return newly-created tunnel
        return this.tunnel;
        
    }
Associates a new GuacamoleTunnel with this connection record using the
given socket.

@param socket
    The GuacamoleSocket to use to create the tunnel associated with this
    connection record.

@param connectionID
    The connection ID assigned to this connection by guacd.

@return
    The newly-created tunnel associated with this connection record.
extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/tunnel/ActiveConnectionRecord.java