Package com.betfair.cougar.netutil.nio

Examples of com.betfair.cougar.netutil.nio.CougarProtocol


    public synchronized void setHealthState(boolean isHealthy) {
        if (logger.isLoggable(Level.INFO)) {
            logger.log(Level.INFO, "setting protocol to " + (isHealthy ? "enabled" : "disabled"));
        }
        if (socketAcceptor != null) {
            CougarProtocol cougarProtocol = (CougarProtocol) socketAcceptor.getDefaultConfig().getFilterChain().get("protocol");
            cougarProtocol.setEnabled(isHealthy);
            if (!isHealthy) {
                shutdownSessions(false);
            }
        }
    }
View Full Code Here


    }

    @ManagedAttribute
    public synchronized Boolean isHealthState() {
        if (socketAcceptor != null) {
            CougarProtocol cougarProtocol = (CougarProtocol) socketAcceptor.getDefaultConfig().getFilterChain().get("protocol");
            return cougarProtocol.isEnabled();
        }
        return null;
    }
View Full Code Here

        return null;
    }

    @ManagedAttribute
    public boolean isEnabled() {
        final CougarProtocol protocol = (CougarProtocol) socketAcceptor.getDefaultConfig().getFilterChain().get("protocol");
        if (protocol != null) {
            return protocol.isEnabled();
        }

        return false;
    }
View Full Code Here

    public void setSessionManager(IoSessionManager sessionManager) {
        this.sessionManager = sessionManager;
    }

    private void shutdownSessions(boolean blockUntilComplete) {
        CougarProtocol cougarProtocol = (CougarProtocol) socketAcceptor.getDefaultConfig().getFilterChain().get("protocol");
        sessionManager.shutdownSessions(socketAcceptor.getManagedSessions(socketAddress), cougarProtocol, this.serverHandler, blockUntilComplete);
    }
View Full Code Here

TOP

Related Classes of com.betfair.cougar.netutil.nio.CougarProtocol

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.