Package io.apigee.trireme.core

Examples of io.apigee.trireme.core.NetworkPolicy


    public int send(String host, int port, ByteBuffer buf, HandleListener listener, Object context)
        throws NodeOSException
    {
        InetSocketAddress addr = new InetSocketAddress(host, port);
        NetworkPolicy netPolicy = getNetworkPolicy();
        if ((netPolicy != null) && !netPolicy.allowListening(addr)) {
            log.debug("Address {} not allowed by network policy", addr);
            throw new NodeOSException(Constants.EINVAL);
        }

        QueuedWrite qw = new QueuedWrite(buf, listener, context);
View Full Code Here


        throws NodeOSException
    {
        if (boundAddress == null) {
            throw new NodeOSException(Constants.EINVAL);
        }
        NetworkPolicy netPolicy = getNetworkPolicy();
        if ((netPolicy != null) && !netPolicy.allowListening(boundAddress)) {
            log.debug("Address {} not allowed by network policy", boundAddress);
            throw new NodeOSException(Constants.EINVAL);
        }

        this.listener = listener;
View Full Code Here

    {
        boolean success = false;
        SocketChannel newChannel = null;
        try {
            InetSocketAddress targetAddress = new InetSocketAddress(host, port);
            NetworkPolicy netPolicy = getNetworkPolicy();
            if ((netPolicy != null) && !netPolicy.allowConnection(targetAddress)) {
                log.debug("Disallowed connection to {} due to network policy", targetAddress);
                throw new NodeOSException(Constants.EINVAL);
            }

            if (log.isDebugEnabled()) {
View Full Code Here

TOP

Related Classes of io.apigee.trireme.core.NetworkPolicy

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.