91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 26.19MB
    文件類型: .rar
    金幣: 1
    下載: 0 次
    發布日期: 2023-06-22
  • 語言: 其他
  • 標簽: MQTT??apache-apoll??

資源簡介

Apache Apollo是一個代理服務器,Apollo允許客戶端通過開放的MQTT協議連接。

資源截圖

代碼片段和文件信息

/**
?*?Licensed?to?the?Apache?Software?Foundation?(ASF)?under?one?or?more
?*?contributor?license?agreements.??See?the?NOTICE?file?distributed?with
?*?this?work?for?additional?information?regarding?copyright?ownership.
?*?The?ASF?licenses?this?file?to?You?under?the?Apache?License?Version?2.0
?*?(the?“License“);?you?may?not?use?this?file?except?in?compliance?with
?*?the?License.??You?may?obtain?a?copy?of?the?License?at
?*
?*??????http://www.apache.org/licenses/LICENSE-2.0
?*
?*?Unless?required?by?applicable?law?or?agreed?to?in?writing?software
?*?distributed?under?the?License?is?distributed?on?an?“AS?IS“?BASIS
?*?WITHOUT?WARRANTIES?OR?CONDITIONS?OF?ANY?KIND?either?express?or?implied.
?*?See?the?License?for?the?specific?language?governing?permissions?and
?*?limitations?under?the?License.
?*/
package?example;

import?org.apache.qpid.amqp_1_0.jms.impl.*;
import?javax.jms.*;

class?Listener?{

????public?static?void?main(String?[]args)?throws?JMSException?{

????????String?user?=?env(“APOLLO_USER“?“admin“);
????????String?password?=?env(“APOLLO_PASSWORD“?“password“);
????????String?host?=?env(“APOLLO_HOST“?“localhost“);
????????int?port?=?Integer.parseInt(env(“APOLLO_PORT“?“61613“));
????????String?destination?=?arg(args?0?“topic://event“);

????????ConnectionFactoryImpl?factory?=?new?ConnectionFactoryImpl(host?port?user?password);
????????Destination?dest?=?null;
????????if(?destination.startsWith(“topic://“)?)?{
????????????dest?=?new?TopicImpl(destination);
????????}?else?{
????????????dest?=?new?QueueImpl(destination);
????????}

????????Connection?connection?=?factory.createConnection(user?password);
????????connection.start();
????????Session?session?=?connection.createSession(false?Session.AUTO_ACKNOWLEDGE);
????????MessageConsumer?consumer?=?session.createConsumer(dest);
????????long?start?=?System.currentTimeMillis();
????????long?count?=?1;
????????System.out.println(“Waiting?for?messages...“);
????????while(true)?{
????????????Message?msg?=?consumer.receive();
????????????if(?msg?instanceof??TextMessage?)?{
????????????????String?body?=?((TextMessage)?msg).getText();
????????????????if(?“SHUTDOWN“.equals(body))?{
????????????????????long?diff?=?System.currentTimeMillis()?-?start;
????????????????????System.out.println(String.format(“Received?%d?in?%.2f?seconds“?count?(1.0*diff/1000.0)));
????????????????????connection.close();
????????????????????System.exit(1);
????????????????}?else?{
????????????????????try?{
????????????????????????if(?count?!=?msg.getIntProperty(“id“)?)?{
????????????????????????????System.out.println(“mismatch:?“+count+“!=“+msg.getIntProperty(“id“));
????????????????????????}
????????????????????}?catch?(NumberFormatException?ignore)?{
????????????????????}
????????????????????if(?count?==?1?)?{
????????????????????????start?=?System.currentTimeMillis();
????????????????????}?else?if(?count?%?1000?==?0?)?{
????????????????????????System.o

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件???????5476??2015-01-29?10:55??apache-apollo-1.7.1\bin\apollo

?????文件???????2891??2015-01-29?10:55??apache-apollo-1.7.1\bin\apollo.cmd

?????文件??????42511??2015-01-29?10:54??apache-apollo-1.7.1\docs\site\blog\index.html

?????文件??????49576??2015-01-29?10:54??apache-apollo-1.7.1\docs\site\blog\index.rss

?????文件???????3963??2015-01-29?10:54??apache-apollo-1.7.1\docs\site\blog\releases\release-1-0-beta1.html

?????文件???????6551??2015-01-29?10:54??apache-apollo-1.7.1\docs\site\blog\releases\release-1-0-beta2.html

?????文件???????5820??2015-01-29?10:54??apache-apollo-1.7.1\docs\site\blog\releases\release-1-0-beta3.html

?????文件???????5550??2015-01-29?10:54??apache-apollo-1.7.1\docs\site\blog\releases\release-1-0-beta4.html

?????文件???????5710??2015-01-29?10:54??apache-apollo-1.7.1\docs\site\blog\releases\release-1-0-beta5.html

?????文件???????5133??2015-01-29?10:54??apache-apollo-1.7.1\docs\site\blog\releases\release-1-0-beta6.html

?????文件???????6274??2015-01-29?10:54??apache-apollo-1.7.1\docs\site\blog\releases\release-1.0.html

?????文件???????3206??2015-01-29?10:54??apache-apollo-1.7.1\docs\site\blog\releases\release-1.1.html

?????文件???????3663??2015-01-29?10:54??apache-apollo-1.7.1\docs\site\blog\releases\release-1.2.html

?????文件???????3382??2015-01-29?10:54??apache-apollo-1.7.1\docs\site\blog\releases\release-1.3.html

?????文件???????2996??2015-01-29?10:54??apache-apollo-1.7.1\docs\site\blog\releases\release-1.4.html

?????文件???????4064??2015-01-29?10:54??apache-apollo-1.7.1\docs\site\blog\releases\release-1.5.html

?????文件???????3525??2015-01-29?10:54??apache-apollo-1.7.1\docs\site\blog\releases\release-1.6.html

?????文件???????4848??2015-01-29?10:54??apache-apollo-1.7.1\docs\site\blog\releases\release-1.7.html

?????文件???????4448??2015-01-29?10:54??apache-apollo-1.7.1\docs\site\community\building.html

?????文件???????5678??2015-01-29?10:54??apache-apollo-1.7.1\docs\site\community\contributing.html

?????文件???????3392??2015-01-29?10:54??apache-apollo-1.7.1\docs\site\community\developers.html

?????文件???????4816??2015-01-29?10:54??apache-apollo-1.7.1\docs\site\community\faq.html

?????文件???????5006??2015-01-29?10:54??apache-apollo-1.7.1\docs\site\community\index.html

?????文件???????3749??2015-01-29?10:54??apache-apollo-1.7.1\docs\site\community\release-guide.html

?????文件???????4138??2015-01-29?10:54??apache-apollo-1.7.1\docs\site\community\site.html

?????文件???????6417??2015-01-29?10:54??apache-apollo-1.7.1\docs\site\community\source.html

?????文件???????2781??2015-01-29?10:54??apache-apollo-1.7.1\docs\site\community\support.html

?????文件??????20977??2015-01-29?10:54??apache-apollo-1.7.1\docs\site\documentation\amqp-manual.html

?????文件??????34898??2015-01-29?10:47??apache-apollo-1.7.1\docs\site\documentation\api\apollo-broker\index\index-a.html

?????文件??????19389??2015-01-29?10:47??apache-apollo-1.7.1\docs\site\documentation\api\apollo-broker\index\index-b.html

............此處省略1182個文件信息

評論

共有 條評論