Examples of NetworkInterfaceBinding


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

        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

        context.addStep(new OperationStepHandler() {
            @Override
            public void execute(final OperationContext context, final ModelNode operation) throws OperationFailedException {
                final ServiceController<?> controller = context.getServiceRegistry(false).getService(NetworkInterfaceService.JBOSS_NETWORK_INTERFACE.append(interfaceName));
                if(controller != null && controller.getState() == ServiceController.State.UP) {
                    final NetworkInterfaceBinding binding = NetworkInterfaceBinding.class.cast(controller.getValue());
                    final InetAddress address = binding.getAddress();
                    final ModelNode result = new ModelNode();
                    if(RESOLVED_ADDRESS.equals(attributeName)) {
                        result.set(address.getHostAddress());
                    }
                    context.getResult().set(result);
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

                try {

                    final InetAddress inet = localAddress != null ? InetAddress.getByName(localAddress) : InetAddress.getLocalHost();
                    final NetworkInterface intf = NetworkInterface.getByInetAddress(inet);
                    final NetworkInterfaceBinding b = new NetworkInterfaceBinding(Collections.singleton(intf), inet);
                    final InetAddress group = InetAddress.getByName(groupAddress);

                    final SocketBinding socketBinding = new SocketBinding(name, -1, false, group, groupPort, b, null);

                    final GroupBindingService bindingService = new GroupBindingService();
View Full Code Here

Examples of org.jboss.as.network.NetworkInterfaceBinding

                try {

                    final InetAddress inet = localAddress != null ? InetAddress.getByName(localAddress) : InetAddress.getLocalHost();
                    final NetworkInterface intf = NetworkInterface.getByInetAddress(inet);
                    final NetworkInterfaceBinding b = new NetworkInterfaceBinding(Collections.singleton(intf), inet);
                    final InetAddress group = InetAddress.getByName(groupAddress);

                    final SocketBinding socketBinding = new SocketBinding(name, -1, false, group, groupPort, b, null);

                    final GroupBindingService bindingService = new GroupBindingService();
View Full Code Here

Examples of org.jboss.as.network.NetworkInterfaceBinding

                try {

                    final InetAddress inet = localAddress != null ? InetAddress.getByName(localAddress) : InetAddressUtil.getLocalHost();
                    final NetworkInterface intf = NetworkInterface.getByInetAddress(inet);
                    final NetworkInterfaceBinding b = new NetworkInterfaceBinding(Collections.singleton(intf), inet);
                    final InetAddress group = InetAddress.getByName(groupAddress);

                    final SocketBinding socketBinding = new SocketBinding(name, localBindPort, false, group, groupPort, b, null, null);

                    final GroupBindingService bindingService = new GroupBindingService();
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
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.