• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java TransportException类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.wso2.carbon.databridge.commons.exception.TransportException的典型用法代码示例。如果您正苦于以下问题:Java TransportException类的具体用法?Java TransportException怎么用?Java TransportException使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



TransportException类属于org.wso2.carbon.databridge.commons.exception包,在下文中一共展示了TransportException类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: publish

import org.wso2.carbon.databridge.commons.exception.TransportException; //导入依赖的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: configure

import org.wso2.carbon.databridge.commons.exception.TransportException; //导入依赖的package包/类
public void configure() throws IOException, XMLStreamException, DataEndpointAuthenticationException,
        DataEndpointAgentConfigurationException, TransportException, DataEndpointException,
        DataEndpointConfigurationException {
    // Read bps analytics configuration
    BPSAnalyticsConfiguration bpsAnalyticsConfiguration = BPMNAnalyticsHolder.getInstance().getBPSAnalyticsServer
            ().getBPSAnalyticsConfiguration();

    if (bpsAnalyticsConfiguration.isBpmnDataPublishingEnabled() || bpsAnalyticsConfiguration
            .isBpmnKPIDataPublishingEnabled()) {
        configDataPublishing(bpsAnalyticsConfiguration.getAnalyticsReceiverURLSet(),
                bpsAnalyticsConfiguration.getAnalyticsServerUsername(), bpsAnalyticsConfiguration
                        .getAnalyticsServerPassword(), bpsAnalyticsConfiguration.getAnalyticsAuthURLSet()
                , bpsAnalyticsConfiguration.getBpmnAnalyticsPublisherType(), bpsAnalyticsConfiguration
                        .isBpmnAsyncDataPublishingEnabled(), bpsAnalyticsConfiguration
                        .isBpmnDataPublishingEnabled(), bpsAnalyticsConfiguration.isBpmnKPIDataPublishingEnabled());
    }
}
 
开发者ID:wso2,项目名称:carbon-business-process,代码行数:18,代码来源:BPMNDataPublisher.java


示例3: DasReporter

import org.wso2.carbon.databridge.commons.exception.TransportException; //导入依赖的package包/类
private DasReporter(MetricRegistry registry, String source, String type, String receiverURL, String authURL,
                    String username, String password, String dataAgentConfigPath, TimeUnit rateUnit,
                    TimeUnit durationUnit, Clock clock, MetricFilter filter) {
    super(registry, "das-reporter", filter, rateUnit, durationUnit);
    this.source = source;
    this.clock = clock;
    if (source == null || source.trim().isEmpty()) {
        throw new IllegalArgumentException("Source cannot be null or empty");
    }
    if (type == null || type.trim().isEmpty()) {
        throw new IllegalArgumentException("Type cannot be null or empty");
    }
    if (receiverURL == null || receiverURL.trim().isEmpty()) {
        throw new IllegalArgumentException("Data Receiver URL cannot be null or empty");
    }
    if (username == null || username.trim().isEmpty()) {
        throw new IllegalArgumentException("Username cannot be null or empty");
    }
    if (password == null || password.trim().isEmpty()) {
        throw new IllegalArgumentException("Password cannot be null or empty");
    }
    if (dataAgentConfigPath != null) {
        AgentHolder.setConfigPath(dataAgentConfigPath);
    }
    try {
        dataPublisher = new DataPublisher(type, receiverURL, authURL, username, password);
    } catch (DataEndpointAgentConfigurationException | DataEndpointException | DataEndpointConfigurationException
            | DataEndpointAuthenticationException | TransportException e) {
        throw new IllegalStateException("Error when initializing the Data Publisher", e);
    }
}
 
开发者ID:wso2,项目名称:carbon-metrics,代码行数:32,代码来源:DasReporter.java


示例4: init

import org.wso2.carbon.databridge.commons.exception.TransportException; //导入依赖的package包/类
private void init(DasConfig dasConfig) {
    if (logger.isInfoEnabled()) {
        logger.info("Initializing HTTP Monitoring Data Publisher");
    }

    String type = dasConfig.getType();
    String receiverURL = dasConfig.getReceiverURL();
    String authURL = dasConfig.getAuthURL();
    String username = dasConfig.getUsername();
    String password = dasConfig.getPassword();
    String dataAgentConfigPath = dasConfig.getDataAgentConfigPath();

    if (type == null) {
        throw new IllegalArgumentException("Type cannot be null");
    }
    if (receiverURL == null) {
        throw new IllegalArgumentException("Data Receiver URL cannot be null");
    }
    if (username == null) {
        throw new IllegalArgumentException("Username cannot be null");
    }
    if (password == null) {
        throw new IllegalArgumentException("Password cannot be null");
    }
    if (dataAgentConfigPath == null) {
        throw new IllegalArgumentException("Data Agent Configuration Path cannot be null");
    }
    AgentHolder.setConfigPath(dataAgentConfigPath);
    arbitraryAttributes = SystemVariableUtil.getArbitraryAttributes();
    try {
        dataPublisher = new DataPublisher(type, receiverURL, authURL, username, password);
    } catch (DataEndpointAgentConfigurationException | DataEndpointException | DataEndpointConfigurationException
            | DataEndpointAuthenticationException | TransportException e) {
        throw new IllegalStateException("Error when initializing the Data Publisher", e);
    }
}
 
开发者ID:wso2,项目名称:msf4j,代码行数:37,代码来源:HTTPMonitoringDataPublisher.java


示例5: deleteColumnFamily

import org.wso2.carbon.databridge.commons.exception.TransportException; //导入依赖的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.TransportException类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java FilterFactoryImpl类代码示例发布时间:2022-05-22
下一篇:
Java CompilationResult类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap