Package com.sun.grizzly.util

Examples of com.sun.grizzly.util.AttributeHolder


    }

    private StompProtocolHandler getStompProtocolHandler(Context ctx) {

        StompProtocolHandler sph = null;
        AttributeHolder attr = ctx.getAttributeHolderByScope(Context.AttributeScope.CONNECTION);
        if (attr == null) {
            WorkerThread workerThread = (WorkerThread)Thread.currentThread();
            attr = workerThread.getAttachment();
            ctx.getSelectionKey().attach(attr);
        }
        sph = (StompProtocolHandler)attr.getAttribute(STOMP_PROTOCOL_HANDLER_ATTR);
        if (sph == null) {
            sph = new StompProtocolHandler(_bc, _jmsprop);
            attr.setAttribute(STOMP_PROTOCOL_HANDLER_ATTR, sph);
        }
        return sph;
    }
View Full Code Here


                StompBridgeResources.I_SELECTION_KEY_LOCAL_CLOSED, (key == null ? "":key.toString())));
        if (key == null) return;
        Object o = key.attachment();

        if (o instanceof AttributeHolder) {
            AttributeHolder attr = (AttributeHolder)o;
            StompProtocolHandler sph = (StompProtocolHandler)attr.getAttribute(
                                        StompProtocolFilter.STOMP_PROTOCOL_HANDLER_ATTR);
            if (sph != null) {
                _logger.log(Level.INFO, getStompBridgeResources().getString(
                            StompBridgeResources.I_CLOSE_STOMP_HANDLER,
                            (sph == null ?"":sph.toString()), (key == null ? "":key.toString())));
View Full Code Here

                StompBridgeResources.I_SELECTION_KEY_REMOTE_CLOSED, (key == null ? "":key.toString())));
        if (key == null) return;

        Object o = key.attachment();
        if (o instanceof AttributeHolder) {
            AttributeHolder attr = (AttributeHolder)o;
            StompProtocolHandler sph = (StompProtocolHandler)attr.getAttribute(
                                        StompProtocolFilter.STOMP_PROTOCOL_HANDLER_ATTR);
            if (sph != null) {
                _logger.log(Level.INFO, getStompBridgeResources().getString(
                            StompBridgeResources.I_CLOSE_STOMP_HANDLER,
                            (sph == null ?"":sph.toString()), (key == null ? "":key.toString())));
View Full Code Here

TOP

Related Classes of com.sun.grizzly.util.AttributeHolder

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.