Examples of CougarProtocol


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

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

    }

    @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

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

        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

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

    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
Copyright © 2018 www.massapi.com. 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.