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

Java DataEndpointAuthenticationException类代码示例

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

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



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

示例1: publish

import org.wso2.carbon.databridge.agent.exception.DataEndpointAuthenticationException; //导入依赖的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.agent.exception.DataEndpointAuthenticationException; //导入依赖的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.agent.exception.DataEndpointAuthenticationException; //导入依赖的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.agent.exception.DataEndpointAuthenticationException; //导入依赖的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: publish

import org.wso2.carbon.databridge.agent.exception.DataEndpointAuthenticationException; //导入依赖的package包/类
public static void publish(String host, String port, String username, String password, int events)
        throws MalformedStreamDefinitionException,
        StreamDefinitionException, DifferentStreamDefinitionAlreadyDefinedException,
        MalformedURLException,
        AuthenticationException, NoStreamDefinitionExistException,
        org.wso2.carbon.databridge.commons.exception.AuthenticationException,
        TransportException, SocketException, DataEndpointAgentConfigurationException, DataEndpointException, DataEndpointAuthenticationException, DataEndpointConfigurationException {
    System.out.println("Starting Stock quote Agent");

    KeyStoreUtil.setTrustStoreParams();

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

    String streamId = DataBridgeCommonsUtils.generateStreamId(STREAM_NAME1, VERSION1);

    //Publish event for a valid stream
    if (!streamId.isEmpty()) {
        System.out.println("Stream ID: " + streamId);

        while (sentEventCount < events) {
            dataPublisher.publish(streamId, null, null, getPayload());
            sentEventCount++;
            System.out.println("Events published : " + sentEventCount);
        }
        try {
            Thread.sleep(3000);
        } catch (InterruptedException e) {
            //ignore
        }

        dataPublisher.shutdown();
    }
}
 
开发者ID:wso2,项目名称:product-cep,代码行数:35,代码来源:StockQuoteClient.java


示例6: publish

import org.wso2.carbon.databridge.agent.exception.DataEndpointAuthenticationException; //导入依赖的package包/类
public static void publish(String host, String port, String username, String password, int events)
            throws  MalformedStreamDefinitionException,
            StreamDefinitionException, DifferentStreamDefinitionAlreadyDefinedException,
            MalformedURLException,
            AuthenticationException, NoStreamDefinitionExistException,
            org.wso2.carbon.databridge.commons.exception.AuthenticationException,
            TransportException, SocketException, DataEndpointAgentConfigurationException, DataEndpointException,
            DataEndpointAuthenticationException, DataEndpointConfigurationException {
        System.out.println("Starting Statistics Agent");
        KeyStoreUtil.setTrustStoreParams();

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


//        StreamDefinition streamDefinition = new StreamDefinition(STREAM_NAME1, VERSION1);
//        streamDefinition.addMetaData("ipAdd", AttributeType.STRING);
//        streamDefinition.addMetaData("index", AttributeType.LONG);
//        streamDefinition.addMetaData("timestamp", AttributeType.LONG);
//        streamDefinition.addMetaData("nanoTime", AttributeType.LONG);
//        streamDefinition.addPayloadData("userID", AttributeType.STRING);
//        streamDefinition.addPayloadData("searchTerms", AttributeType.STRING);
//        String streamId = dataPublisher.defineStream(streamDefinition);

        String streamId = DataBridgeCommonsUtils.generateStreamId(STREAM_NAME1, VERSION1);
        //Publish event for a valid stream
        if (!streamId.isEmpty()) {
            System.out.println("Stream ID: " + streamId);

            while (sentEventCount < events) {
                dataPublisher.publish(streamId, getMeta(), null, getPayload());
                sentEventCount++;
                System.out.println("Events published : " + sentEventCount);
            }
            try {
                Thread.sleep(3000);
            } catch (InterruptedException e) {
                //ignore
            }

            dataPublisher.shutdown();
        }
    }
 
开发者ID:wso2,项目名称:product-cep,代码行数:44,代码来源:AnalyticStatClient.java


示例7: main

import org.wso2.carbon.databridge.agent.exception.DataEndpointAuthenticationException; //导入依赖的package包/类
public static void main(String[] args)
            throws SocketException, MalformedURLException, AuthenticationException, TransportException, StreamDefinitionException, MalformedStreamDefinitionException, DifferentStreamDefinitionAlreadyDefinedException,
            FileNotFoundException, UnknownHostException, DataEndpointAuthenticationException, DataEndpointAgentConfigurationException, DataEndpointException, DataEndpointConfigurationException {
        System.out.println("Starting HttpLog Agent");

        DataPublisherUtil.setTrustStoreParams();

        AgentHolder.setConfigPath(DataPublisherUtil.getAgentConfigPath());

        String host = args[0];
        String port = args[1];
        String username = args[2];
        String password = args[3];

        //create data publisher

        DataPublisher dataPublisher = new DataPublisher("tcp://" + host + ":" + port, username, password);

        String streamId = DataBridgeCommonsUtils.generateStreamId(HTTPD_LOG_STREAM,VERSION);

//        try {
//            streamId = dataPublisher.findStream(HTTPD_LOG_STREAM, VERSION);
//            System.out.println("Stream already defined");
//
//        } catch (NoStreamDefinitionExistException e) {
//            //Define event stream
//            streamId = dataPublisher.defineStream("{" +
//                                                  "  'name':'" + HTTPD_LOG_STREAM + "'," +
//                                                  "  'version':'" + VERSION + "'," +
//                                                  "  'nickName': 'Httpd_Log_Stream'," +
//                                                  "  'description': 'Sample of Httpd logs'," +
//                                                  "  'metaData':[" +
//                                                  "          {'name':'clientType','type':'STRING'}" +
//                                                  "  ]," +
//                                                  "  'payloadData':[" +
//                                                  "          {'name':'log','type':'STRING'}" +
//                                                  "  ]" +
//                                                  "}");
//
//        }
        if (null != streamId && !streamId.isEmpty()) {
            publishLogEvents(dataPublisher, streamId);
        }
        try {
            Thread.sleep(2000);
        } catch (InterruptedException e) {
        }

        dataPublisher.shutdownWithAgent();
    }
 
开发者ID:wso2,项目名称:product-cep,代码行数:51,代码来源:HttpdLogAgent.java



注:本文中的org.wso2.carbon.databridge.agent.exception.DataEndpointAuthenticationException类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Java ImageUtils类代码示例发布时间:2022-05-22
下一篇:
Java ODatabaseInternal类代码示例发布时间: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