org.wso2.carbon.integration.common.utils
Class ClientConnectionUtil

java.lang.Object
  extended by org.wso2.carbon.integration.common.utils.ClientConnectionUtil

public class ClientConnectionUtil
extends Object


Constructor Summary
ClientConnectionUtil()
           
 
Method Summary
static boolean isPortOpen(int port, String hostName)
          Check whether the provided port is open
static void waitForLogin(org.wso2.carbon.automation.engine.context.AutomationContext context)
          Wait for sometime until it is possible to login to the Carbon server
static void waitForPort(int port, long timeout, boolean verbose, String hostName)
           
static void waitForPort(int port, String hostName)
          Checks whether the given port is open, and waits for sometime until the port is open.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClientConnectionUtil

public ClientConnectionUtil()
Method Detail

waitForLogin

public static void waitForLogin(org.wso2.carbon.automation.engine.context.AutomationContext context)
                         throws MalformedURLException,
                                org.wso2.carbon.authenticator.stub.LoginAuthenticationExceptionException
Wait for sometime until it is possible to login to the Carbon server

Throws:
MalformedURLException
org.wso2.carbon.authenticator.stub.LoginAuthenticationExceptionException

waitForPort

public static void waitForPort(int port,
                               long timeout,
                               boolean verbose,
                               String hostName)
                        throws RuntimeException
Parameters:
port - The port that needs to be checked
timeout - The timeout waiting for the port to open
verbose - if verbose is set to true,
Throws:
RuntimeException - if the port is not opened within the TIMEOUT

waitForPort

public static void waitForPort(int port,
                               String hostName)
Checks whether the given port is open, and waits for sometime until the port is open. If the port is not open within TIMEOUT, throws RuntimeException.

Parameters:
port - The port that needs to be checked
Throws:
RuntimeException - if the port is not opened within the TIMEOUT

isPortOpen

public static boolean isPortOpen(int port,
                                 String hostName)
Check whether the provided port is open

Parameters:
port - The port that needs to be checked
Returns:
true if the port is open & false otherwise


Copyright © 2015 WSO2. All rights reserved.