Examples of NetworkInterfaceBinding


Examples of org.jboss.as.network.NetworkInterfaceBinding

            return consolePort > -1 == false;
        }
    }

    private boolean isAccessible(final InetAddress inboundAddress, final boolean secure) {
        final NetworkInterfaceBinding interfaceBinding = secure ? secureConsoleNetworkInterface : consoleNetworkInterface;
        Collection<NetworkInterface> nics = interfaceBinding.getNetworkInterfaces();

        for (NetworkInterface current : nics) {
            boolean matched = matches(current, inboundAddress);
            if (matched) {
                return true;
View Full Code Here

Examples of org.jboss.as.network.NetworkInterfaceBinding

    public synchronized void stop(StopContext arg0) {
        this.interfaceBinding = null;
    }

    public synchronized NetworkInterfaceBinding getValue() throws IllegalStateException {
        final NetworkInterfaceBinding binding = this.interfaceBinding;
        if(binding == null) {
            throw new IllegalStateException();
        }
        return binding;
    }
View Full Code Here

Examples of org.jboss.as.network.NetworkInterfaceBinding

        }
        return binding;
    }

    static NetworkInterfaceBinding resolveInterface(final InterfaceCriteria criteria) throws SocketException {
        NetworkInterfaceBinding result = null;
        final Enumeration<NetworkInterface> networkInterfaces = NetworkInterface.getNetworkInterfaces();
        log.tracef("resolveInterface, checking criteria: %s\n", criteria);
        while (result == null && networkInterfaces.hasMoreElements()) {
            final NetworkInterface networkInterface = networkInterfaces.nextElement();
            result = resolveInterface(criteria, networkInterface);
View Full Code Here

Examples of org.jboss.as.network.NetworkInterfaceBinding

            }
            log.tracef("Checking interface(name=%s,address=%s), criteria=%s\n", networkInterface.getName(), address, criteria);
            InetAddress bindAddress = criteria.isAcceptable(networkInterface, address);
            if (bindAddress != null) {
                log.tracef("Criteria provided bind address: %s\n", bindAddress);
                return new NetworkInterfaceBinding(Collections.singleton(networkInterface), bindAddress);
            }
        }
        return null;
    }
View Full Code Here

Examples of org.jboss.as.network.NetworkInterfaceBinding

        final Collection<NetworkInterface> interfaces = new ArrayList<NetworkInterface>();
        final Enumeration<NetworkInterface> networkInterfaces = NetworkInterface.getNetworkInterfaces();
        while (networkInterfaces.hasMoreElements()) {
            interfaces.add(networkInterfaces.nextElement());
        }
        return new NetworkInterfaceBinding(interfaces, address);
    }
View Full Code Here

Examples of org.jboss.as.network.NetworkInterfaceBinding

     * @throws StartException If any errors occur
     */
    public synchronized void start(StartContext context) throws StartException {
        final ModelController modelController = modelControllerValue.getValue();
        final ExecutorService executorService = executorServiceValue.getValue();
        final NetworkInterfaceBinding interfaceBinding = interfaceBindingValue.getValue();
        modelControllerClient = modelController.createClient(executorService);

        final int port = portValue.getOptionalValue();
        if (port > 0) {
            bindAddress = new InetSocketAddress(interfaceBinding.getAddress(), port);
        }
        final int securePort = securePortValue.getOptionalValue();
        if (securePort > 0) {
            secureBindAddress = new InetSocketAddress(interfaceBinding.getAddress(), securePort);
        }

        final SecurityRealmService securityRealmService = securityRealmServiceValue.getOptionalValue();

        try {
View Full Code Here

Examples of org.jboss.as.network.NetworkInterfaceBinding

        final ServiceTarget serviceTarget = context.getServiceTarget();
        try {
            super.boot(configurationPersister.load()); // This parses the host.xml and invokes all ops

            //Install the server inventory
            NetworkInterfaceBinding nativeManagementInterfaceBinding = getNativeManagementNetworkInterfaceBinding();
            Future<ServerInventory> inventoryFuture = NewServerInventoryService.install(serviceTarget, this, environment,
                    nativeManagementInterfaceBinding, hostControllerInfo.getNativeManagementPort());

            //Install the core remoting endpoint and listener
            RemotingServices.installRemotingEndpoint(serviceTarget);
View Full Code Here

Examples of org.jboss.as.network.NetworkInterfaceBinding

        InetSocketAddress bindAddress = null;
        InetSocketAddress secureBindAddress = null;

        SocketBinding basicBinding = injectedSocketBindingValue.getOptionalValue();
        SocketBinding secureBinding = injectedSecureSocketBindingValue.getOptionalValue();
        final NetworkInterfaceBinding interfaceBinding = interfaceBindingValue.getOptionalValue();
        if (interfaceBinding != null) {
            useUnmanagedBindings = true;
            final int port = portValue.getOptionalValue();
            if (port > 0) {
                bindAddress = new InetSocketAddress(interfaceBinding.getAddress(), port);
            }
            final int securePort = securePortValue.getOptionalValue();
            if (securePort > 0) {
                secureBindAddress = new InetSocketAddress(interfaceBinding.getAddress(), securePort);
            }
        } else {
            if (basicBinding != null) {
                bindAddress = basicBinding.getSocketAddress();
            }
View Full Code Here

Examples of org.jboss.as.network.NetworkInterfaceBinding

        String target = noconsole;
        if (hasConsole) {
            InetAddress inboundAddress = InetAddress.getByName(req.getLocalAddr());

            boolean secureRedirect = secureRedirect(req.isSecure());
            NetworkInterfaceBinding interfaceBinding = secureRedirect ? secureConsoleNetworkInterface : consoleNetworkInterface;
            String redirectHost = getRedirectHost(interfaceBinding, inboundAddress, req.getServerName());

            if (redirectHost != null) {
                if (secureRedirect) {
                    target = assembleURI(HTTPS, redirectHost, consoleSecurePort, SECURE_DEFAULT_PORT, CONSOLE_PATH);
View Full Code Here

Examples of org.jboss.as.network.NetworkInterfaceBinding

    public synchronized void stop(StopContext arg0) {
        this.interfaceBinding = null;
    }

    public synchronized NetworkInterfaceBinding getValue() throws IllegalStateException {
        final NetworkInterfaceBinding binding = this.interfaceBinding;
        if (binding == null) {
            throw new IllegalStateException();
        }
        return binding;
    }
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.