Examples of ClientMapping


Examples of org.jboss.as.network.ClientMapping

        try {
            clientNetworkAddress = InetAddress.getByName("::");
        } catch (UnknownHostException e) {
            throw new RuntimeException(e);
        }
        final ClientMapping defaultClientMapping = new ClientMapping(clientNetworkAddress, 0, destinationAddress, socketBinding.getAbsolutePort());
        return Collections.singletonList(defaultClientMapping);
    }
View Full Code Here

Examples of org.jboss.as.network.ClientMapping

                logger.debug("Skipping cluster node additions to EJB client context " + ejbClientContext + " since it can only handle local node");
                continue;
            }
            // find a matching client mapping for our bind address
            final List<ClientMapping> clientMappings = entry.getValue();
            ClientMapping resolvedClientMapping = null;
            for (final ClientMapping clientMapping : clientMappings) {
                final InetAddress sourceNetworkAddress = clientMapping.getSourceNetworkAddress();
                final int netMask = clientMapping.getSourceNetworkMaskBits();
                final boolean match = NetworkUtil.belongsToNetwork(bindAddress, sourceNetworkAddress, (byte) (netMask & 0xff));
                if (match) {
                    resolvedClientMapping = clientMapping;
                    logger.debug("Client mapping " + clientMapping + " matches client address " + bindAddress);
                    break;
                }
            }
            if (resolvedClientMapping == null) {
                EjbLogger.ROOT_LOGGER.cannotAddClusterNodeDueToUnresolvableClientMapping(addedNodeName, clusterName, bindAddress);
                continue;
            }
            final ClusterNodeManager remotingClusterNodeManager = new RemotingConnectionClusterNodeManager(clusterContext, endpoint, addedNodeName, resolvedClientMapping.getDestinationAddress(), resolvedClientMapping.getDestinationPort());
            clusterContext.addClusterNodes(remotingClusterNodeManager);
        }

    }
View Full Code Here

Examples of org.jboss.as.network.ClientMapping

            try {
                clientNetworkAddress = InetAddress.getByName("::");
            } catch (UnknownHostException e) {
                throw new RuntimeException(e);
            }
            final ClientMapping defaultClientMapping = new ClientMapping(clientNetworkAddress, 0, destinationAddress, info.getSocketBinding().getAbsolutePort());
            ret.add(defaultClientMapping);
        }
        return ret;
    }
View Full Code Here

Examples of org.jboss.as.network.ClientMapping

                logger.debugf("Skipping cluster node additions to EJB client context %s since it can only handle local node", ejbClientContext);
                continue;
            }
            // find a matching client mapping for our bind address
            final List<ClientMapping> clientMappings = entry.getValue();
            ClientMapping resolvedClientMapping = null;
            for (final ClientMapping clientMapping : clientMappings) {
                final InetAddress sourceNetworkAddress = clientMapping.getSourceNetworkAddress();
                final int netMask = clientMapping.getSourceNetworkMaskBits();
                for(EJBRemoteConnectorService.EjbListenerAddress binding : listeningAddresses) {
                    final boolean match = NetworkUtil.belongsToNetwork(binding.getAddress().getAddress(), sourceNetworkAddress, (byte) (netMask & 0xff));
                    if (match) {
                        resolvedClientMapping = clientMapping;
                        logger.debugf("Client mapping %s matches client address %s", clientMapping, binding.getAddress().getAddress());
                        break;
                    }
                }
                if(resolvedClientMapping != null) {
                    break;
                }
            }
            if (resolvedClientMapping == null) {
                EjbLogger.ROOT_LOGGER.cannotAddClusterNodeDueToUnresolvableClientMapping(addedNodeName, clusterName, listeningAddresses);
                continue;
            }
            final ClusterNodeManager remotingClusterNodeManager = new RemotingConnectionClusterNodeManager(clusterContext, endpoint, addedNodeName, resolvedClientMapping.getDestinationAddress(), resolvedClientMapping.getDestinationPort(), ejbRemoteConnectorService.getProtocol());
            clusterContext.addClusterNodes(remotingClusterNodeManager);
        }

    }
View Full Code Here

Examples of org.jboss.as.network.ClientMapping

        byte[] sourceAddress = new byte[input.readInt()];
        input.readFully(sourceAddress);
        int sourcePort = input.readInt();
        String destAddress = input.readUTF();
        int destPort = input.readInt();
        return new ClientMapping(InetAddress.getByAddress(sourceAddress), sourcePort, destAddress, destPort);
    }
View Full Code Here

Examples of org.jboss.as.network.ClientMapping

        try {
            clientNetworkAddress = InetAddress.getByName("::");
        } catch (UnknownHostException e) {
            throw new RuntimeException(e);
        }
        final ClientMapping defaultClientMapping = new ClientMapping(clientNetworkAddress, 0, destinationAddress, socketBinding.getAbsolutePort());
        return Collections.singletonList(defaultClientMapping);
    }
View Full Code Here

Examples of org.jboss.as.network.ClientMapping

        byte[] sourceAddress = new byte[input.readInt()];
        input.read(sourceAddress);
        int sourcePort = input.readInt();
        String destAddress = input.readUTF();
        int destPort = input.readInt();
        return new ClientMapping(InetAddress.getByAddress(sourceAddress), sourcePort, destAddress, destPort);
    }
View Full Code Here

Examples of org.jboss.as.network.ClientMapping

        byte[] sourceAddress = new byte[input.readInt()];
        input.read(sourceAddress);
        int sourcePort = input.readInt();
        String destAddress = input.readUTF();
        int destPort = input.readInt();
        return new ClientMapping(InetAddress.getByAddress(sourceAddress), sourcePort, destAddress, destPort);
    }
View Full Code Here

Examples of org.jboss.as.network.ClientMapping

                logger.debug("Skipping cluster node additions to EJB client context " + ejbClientContext + " since it can only handle local node");
                continue;
            }
            // find a matching client mapping for our bind address
            final List<ClientMapping> clientMappings = entry.getValue();
            ClientMapping resolvedClientMapping = null;
            for (final ClientMapping clientMapping : clientMappings) {
                final InetAddress sourceNetworkAddress = clientMapping.getSourceNetworkAddress();
                final int netMask = clientMapping.getSourceNetworkMaskBits();
                final boolean match = NetworkUtil.belongsToNetwork(bindAddress, sourceNetworkAddress, (byte) (netMask & 0xff));
                if (match) {
                    resolvedClientMapping = clientMapping;
                    logger.debug("Client mapping " + clientMapping + " matches client address " + bindAddress);
                    break;
                }
            }
            if (resolvedClientMapping == null) {
                EjbLogger.ROOT_LOGGER.cannotAddClusterNodeDueToUnresolvableClientMapping(addedNodeName, clusterName, bindAddress);
                continue;
            }
            final ClusterNodeManager remotingClusterNodeManager = new RemotingConnectionClusterNodeManager(clusterContext, endpoint, addedNodeName, resolvedClientMapping.getDestinationAddress(), resolvedClientMapping.getDestinationPort());
            clusterContext.addClusterNodes(remotingClusterNodeManager);
        }

    }
View Full Code Here

Examples of org.jboss.as.network.ClientMapping

            }
            destination = destinationNode.asString();

            ModelNode portNode = mappingNode.get(DESTINATION_PORT);
            port = portNode.isDefined() ? portNode.asInt() : -1;
            clientMappings.add(new ClientMapping(sourceAddress, mask, destination, port));
        }

        return clientMappings;
    }
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.