Class DASThriftTestServer
java.lang.Object
org.wso2.am.integration.test.utils.thrift.DASThriftTestServer
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 -
Method Summary
Modifier and TypeMethodDescriptionvoidaddStreamDefinition(String streamDefinitionStr, int tenantId) voidaddStreamDefinition(org.wso2.carbon.databridge.commons.StreamDefinition streamDefinition, int tenantId) voidintintvoidvoidvoidsetTenantDomain(String tenantDomain) voidsetTenantId(int tenantId) voidstart(int receiverPort) voidstop()voidstopAndStartDuration(int port, long stopAfterTimeMilliSeconds, long startAfterTimeMS)
-
Constructor Details
-
DASThriftTestServer
public DASThriftTestServer()
-
-
Method Details
-
setTenantId
public void setTenantId(int tenantId) -
setTenantDomain
-
clearTables
public void clearTables() -
getDataTables
-
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()
-