當前位置: 首頁>>代碼示例>>Java>>正文


Java StreamDefinitionException類代碼示例

本文整理匯總了Java中org.wso2.carbon.databridge.commons.exception.StreamDefinitionException的典型用法代碼示例。如果您正苦於以下問題:Java StreamDefinitionException類的具體用法?Java StreamDefinitionException怎麽用?Java StreamDefinitionException使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


StreamDefinitionException類屬於org.wso2.carbon.databridge.commons.exception包,在下文中一共展示了StreamDefinitionException類的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: publish

import org.wso2.carbon.databridge.commons.exception.StreamDefinitionException; //導入依賴的package包/類
public static void publish(String protocol, String host, String port, String username, String password,
        String streamId,String dataFileName, String testCaseFolderName, StreamDefinition streamDefinition,
        int events, int delay) throws MalformedStreamDefinitionException,
        StreamDefinitionException, DifferentStreamDefinitionAlreadyDefinedException,
        MalformedURLException, NoStreamDefinitionExistException, AuthenticationException,
        TransportException, SocketException, DataEndpointAgentConfigurationException, DataEndpointException,
        DataEndpointAuthenticationException, DataEndpointConfigurationException {

    String relativeFilePath = getTestDataFileLocation(testCaseFolderName, dataFileName);

    KeyStoreUtil.setTrustStoreParams();
    //create data publisher
    DataPublisher dataPublisher = new DataPublisher(protocol, "tcp://" + host + ":" + port, null, username,
            password);

    //Publish event for a valid stream
    publishEvents(dataPublisher, streamDefinition, relativeFilePath, events, delay);
    dataPublisher.shutdown();

}
 
開發者ID:wso2,項目名稱:product-cep,代碼行數:21,代碼來源:Wso2EventClient.java

示例2: deleteColumnFamily

import org.wso2.carbon.databridge.commons.exception.StreamDefinitionException; //導入依賴的package包/類
public void deleteColumnFamily(String columnFamily) throws SummarizerException, AgentException, MalformedURLException, AuthenticationException, TransportException, StreamDefinitionException, NoStreamDefinitionExistException {
    log.info("Deleting CF " + columnFamily);
    newConnection().dropColumnFamily(keyspaceName, columnFamily, true);
    DateFormat dateFormat = new SimpleDateFormat("yyyy_MM_dd");
    Date date = new Date();
    String prevDate = dateFormat.format(date.getTime() - 1000 * 60 * 60 * 24);
    if (log.isDebugEnabled()) {
        log.debug("The column family dated " + prevDate + " was deleted successfully.");
    }
}
 
開發者ID:wso2,項目名稱:carbon-commons,代碼行數:11,代碼來源:ColumnFamilyHandler.java


注:本文中的org.wso2.carbon.databridge.commons.exception.StreamDefinitionException類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。