JBoss EJB client 1.0.11.Final-redhat-1

org.jboss.ejb.client.remoting
Class NetworkUtil

java.lang.Object
  extended by org.jboss.ejb.client.remoting.NetworkUtil

public class NetworkUtil
extends Object

Author:
Jaikiran Pai

Constructor Summary
NetworkUtil()
           
 
Method Summary
static boolean belongsToNetwork(InetAddress address, InetAddress networkAddress, byte networkMask)
          Returns true if the passed address is part of the network represented by the passed networkAddress and networkMask.
static org.xnio.IoFuture<org.jboss.remoting3.Connection> connect(org.jboss.remoting3.Endpoint endpoint, InetSocketAddress destination, InetSocketAddress sourceBindAddress, org.xnio.OptionMap connectionCreationOptions, CallbackHandler callbackHandler, SSLContext sslContext)
          Returns a IoFuture to a Connection which is established to the destination host.
static org.xnio.IoFuture<org.jboss.remoting3.Connection> connect(org.jboss.remoting3.Endpoint endpoint, String destinationHost, int destinationPort, InetSocketAddress sourceBindAddress, org.xnio.OptionMap connectionCreationOptions, CallbackHandler callbackHandler, SSLContext sslContext)
          Returns a IoFuture to a Connection which is established to the destination host.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NetworkUtil

public NetworkUtil()
Method Detail

belongsToNetwork

public static boolean belongsToNetwork(InetAddress address,
                                       InetAddress networkAddress,
                                       byte networkMask)
Returns true if the passed address is part of the network represented by the passed networkAddress and networkMask. Else returns false

Parameters:
address - The address being checked
networkAddress - The network address
networkMask - The network mask bits
Returns:

connect

public static org.xnio.IoFuture<org.jboss.remoting3.Connection> connect(org.jboss.remoting3.Endpoint endpoint,
                                                                        String destinationHost,
                                                                        int destinationPort,
                                                                        InetSocketAddress sourceBindAddress,
                                                                        org.xnio.OptionMap connectionCreationOptions,
                                                                        CallbackHandler callbackHandler,
                                                                        SSLContext sslContext)
                                                                 throws IOException
Returns a IoFuture to a Connection which is established to the destination host.

This method takes care of any necessary formatting of the passed destinationHost in case it's a IPv6 address.

Parameters:
endpoint - The Endpoint that will be used to establish the connection
destinationHost - The destination host to connect to. This can either be a host name or a IP address
destinationPort - The destination port to connect to.
sourceBindAddress - An optional source bind address to be used while connecting.
connectionCreationOptions - The connection creations options to use while connecting
callbackHandler - The CallbackHandler to use for authenticating the connection creation
sslContext - The SSL context to use for SSL connections. Can be null.
Returns:
Throws:
IOException

connect

public static org.xnio.IoFuture<org.jboss.remoting3.Connection> connect(org.jboss.remoting3.Endpoint endpoint,
                                                                        InetSocketAddress destination,
                                                                        InetSocketAddress sourceBindAddress,
                                                                        org.xnio.OptionMap connectionCreationOptions,
                                                                        CallbackHandler callbackHandler,
                                                                        SSLContext sslContext)
                                                                 throws IOException
Returns a IoFuture to a Connection which is established to the destination host.

Parameters:
endpoint - The Endpoint that will be used to establish the connection
destination - The InetSocketAddress destination to connect to
sourceBindAddress - An optional source bind address to be used while connecting.
connectionCreationOptions - The connection creations options to use while connecting
callbackHandler - The CallbackHandler to use for authenticating the connection creation
sslContext - The SSL context to use for SSL connections. Can be null.
Returns:
Throws:
IOException

JBoss EJB client 1.0.11.Final-redhat-1

Copyright © 2012 JBoss by Red Hat. All Rights Reserved.