Class DASThriftTestServer
- java.lang.Object
-
- org.wso2.am.integration.test.utils.thrift.DASThriftTestServer
-
public class DASThriftTestServer extends Object
This class is used to start a test thrift server to simulate DAS event receiver. It used to test APIM stat publishing to DAS
-
-
Constructor Summary
Constructors Constructor Description DASThriftTestServer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddStreamDefinition(String streamDefinitionStr, int tenantId)voidaddStreamDefinition(org.wso2.carbon.databridge.commons.StreamDefinition streamDefinition, int tenantId)voidclearTables()Map<String,List<org.wso2.carbon.databridge.commons.Event>>getDataTables()intgetEventsReceivedBeforeLastRestart()intgetNumberOfEventsReceived()voidresetReceivedEvents()voidresetTables()voidsetTenantDomain(String tenantDomain)voidsetTenantId(int tenantId)voidstart(int receiverPort)voidstop()voidstopAndStartDuration(int port, long stopAfterTimeMilliSeconds, long startAfterTimeMS)
-
-
-
Method Detail
-
setTenantId
public void setTenantId(int tenantId)
-
setTenantDomain
public void setTenantDomain(String tenantDomain)
-
clearTables
public void clearTables()
-
resetTables
public void resetTables()
-
addStreamDefinition
public void addStreamDefinition(org.wso2.carbon.databridge.commons.StreamDefinition streamDefinition, int tenantId) throws org.wso2.carbon.databridge.core.exception.StreamDefinitionStoreException- Throws:
org.wso2.carbon.databridge.core.exception.StreamDefinitionStoreException
-
addStreamDefinition
public void addStreamDefinition(String streamDefinitionStr, int tenantId) throws org.wso2.carbon.databridge.core.exception.StreamDefinitionStoreException, org.wso2.carbon.databridge.commons.exception.MalformedStreamDefinitionException
- Throws:
org.wso2.carbon.databridge.core.exception.StreamDefinitionStoreExceptionorg.wso2.carbon.databridge.commons.exception.MalformedStreamDefinitionException
-
start
public void start(int receiverPort) throws org.wso2.carbon.databridge.core.exception.DataBridgeException- Throws:
org.wso2.carbon.databridge.core.exception.DataBridgeException
-
getNumberOfEventsReceived
public int getNumberOfEventsReceived()
-
resetReceivedEvents
public void resetReceivedEvents()
-
stop
public void stop()
-
stopAndStartDuration
public void stopAndStartDuration(int port, long stopAfterTimeMilliSeconds, long startAfterTimeMS) throws SocketException, org.wso2.carbon.databridge.core.exception.DataBridgeException- Throws:
SocketExceptionorg.wso2.carbon.databridge.core.exception.DataBridgeException
-
getEventsReceivedBeforeLastRestart
public int getEventsReceivedBeforeLastRestart()
-
-