public class CGUtils extends Object
public static CloudGatewayService.Client getCGThriftClient(String hostName, int port, int timeOut, String trustStorePath, String trustStorePassWord)
hostName
- thrift server host nameport
- thrift server port client should connect totimeOut
- the thrift client timeouttrustStorePath
- the trust store to use for this clienttrustStorePassWord
- the password of the trust storepublic static void moveElements(BlockingQueue<Message> src, List<Message> dest, int blockSize) throws org.apache.axis2.AxisFault
BlockingQueue.drainTo(java.util.Collection, int)
src
- source bufferdest
- destination bufferblockSize
- blockSize of message bulk that need to moveorg.apache.axis2.AxisFault
- in case of drains failspublic static String getKeyStoreFilePath()
public static String getWSO2KeyStoreFilePath()
public static String getTrustStoreFilePath()
public static String getWSO2TrustStoreFilePath()
public static String getKeyStorePassWord()
public static String getWSO2KeyStorePassword()
public static String getTrustStorePassWord()
public static String getWSO2TrustStorePassword()
public static int getIntProperty(String name, int def)
public static long getLongProperty(String name, long def)
public static double getDoubleProperty(String name, double def)
public static String getCGThriftServerHostName() throws SocketException
SocketException
public static int getCGThriftServerPort()
public static String getUserNameFromTenantUserName(String tenantUserName)
public static String getDomainNameFromTenantUserName(String tenantUserName)
public static String getPlainToken(String encryptedToken) throws org.wso2.carbon.core.util.CryptoException
org.wso2.carbon.core.util.CryptoException
public static boolean isServerAlive(String host, int port)
public static String[] getPermissionsList()
public static void dumpBytesAsString(ByteArrayOutputStream baos)
public static void dumpInputStreamAsString(InputStream is) throws IOException
IOException
Copyright © 2017 WSO2. All rights reserved.