資源簡介
t-io是什么?和netty類似的通訊框架,比netty更易上手。使用t-io通訊框架實現多協議的分類處理,最后將解析后的消息送入activemq隊列,方便后續分析、存庫等操作。

代碼片段和文件信息
/*
?*?Copyright?2007-present?the?original?author?or?authors.
?*
?*?Licensed?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
?*
?*??????https://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.
?*/
import?java.net.*;
import?java.io.*;
import?java.nio.channels.*;
import?java.util.Properties;
public?class?MavenWrapperDownloader?{
????private?static?final?String?WRAPPER_VERSION?=?“0.5.6“;
????/**
?????*?Default?URL?to?download?the?maven-wrapper.jar?from?if?no?‘downloadUrl‘?is?provided.
?????*/
????private?static?final?String?DEFAULT_DOWNLOAD_URL?=?“https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/“
????????????+?WRAPPER_VERSION?+?“/maven-wrapper-“?+?WRAPPER_VERSION?+?“.jar“;
????/**
?????*?Path?to?the?maven-wrapper.properties?file?which?might?contain?a?downloadUrl?property?to
?????*?use?instead?of?the?default?one.
?????*/
????private?static?final?String?MAVEN_WRAPPER_PROPERTIES_PATH?=
????????????“.mvn/wrapper/maven-wrapper.properties“;
????/**
?????*?Path?where?the?maven-wrapper.jar?will?be?saved?to.
?????*/
????private?static?final?String?MAVEN_WRAPPER_JAR_PATH?=
????????????“.mvn/wrapper/maven-wrapper.jar“;
????/**
?????*?Name?of?the?property?which?should?be?used?to?override?the?default?download?url?for?the?wrapper.
?????*/
????private?static?final?String?PROPERTY_NAME_WRAPPER_URL?=?“wrapperUrl“;
????public?static?void?main(String?args[])?{
????????System.out.println(“-?Downloader?started“);
????????File?baseDirectory?=?new?File(args[0]);
????????System.out.println(“-?Using?base?directory:?“?+?baseDirectory.getAbsolutePath());
????????//?If?the?maven-wrapper.properties?exists?read?it?and?check?if?it?contains?a?custom
????????//?wrapperUrl?parameter.
????????File?mavenWrapperPropertyFile?=?new?File(baseDirectory?MAVEN_WRAPPER_PROPERTIES_PATH);
????????String?url?=?DEFAULT_DOWNLOAD_URL;
????????if?(mavenWrapperPropertyFile.exists())?{
????????????FileInputStream?mavenWrapperPropertyFileInputStream?=?null;
????????????try?{
????????????????mavenWrapperPropertyFileInputStream?=?new?FileInputStream(mavenWrapperPropertyFile);
????????????????Properties?mavenWrapperProperties?=?new?Properties();
????????????????mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream);
????????????????url?=?mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL?url);
????????????}?catch?(IOException?e)?{
????????????????System.out.println(“-?ERROR?loading?‘“?+?MAVEN_WRAPPER_PROPERTIES_PATH?+?“‘“);
????????????}?finally?{
????????????????try?{
????
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????364??2020-05-31?10:50??springboot-tio-activemq\.gitignore
?????文件??????50710??2020-05-31?10:50??springboot-tio-activemq\.mvn\wrapper\maven-wrapper.jar
?????文件????????220??2020-05-31?10:50??springboot-tio-activemq\.mvn\wrapper\maven-wrapper.properties
?????文件???????5069??2020-05-31?10:50??springboot-tio-activemq\.mvn\wrapper\MavenWrapperDownloader.java
?????文件??????10380??2020-05-31?10:50??springboot-tio-activemq\mvnw
?????文件???????6790??2020-05-31?10:50??springboot-tio-activemq\mvnw.cmd
?????文件???????3047??2020-05-31?10:50??springboot-tio-activemq\pom.xm
?????文件???????1360??2020-05-31?10:50??springboot-tio-activemq\src\main\java\com\example\demo\activemq\ActiveMQConfig.java
?????文件????????865??2020-05-31?10:50??springboot-tio-activemq\src\main\java\com\example\demo\activemq\ActiveMQListener.java
?????文件???????2335??2020-05-31?10:50??springboot-tio-activemq\src\main\java\com\example\demo\client\handler\JJTSTRespHandler.java
?????文件???????2331??2020-05-31?10:50??springboot-tio-activemq\src\main\java\com\example\demo\client\handler\YYTSRespHandler.java
?????文件???????4013??2020-05-31?10:50??springboot-tio-activemq\src\main\java\com\example\demo\client\ShowcaseClientAioHandler.java
?????文件???????4061??2020-05-31?10:50??springboot-tio-activemq\src\main\java\com\example\demo\client\ShowcaseClientAioListener.java
?????文件???????4768??2020-05-31?10:50??springboot-tio-activemq\src\main\java\com\example\demo\client\ShowcaseClientStarter.java
?????文件???????3539??2020-05-31?10:50??springboot-tio-activemq\src\main\java\com\example\demo\common\AbsCommonAioHandler.java
?????文件???????1943??2020-05-31?10:50??springboot-tio-activemq\src\main\java\com\example\demo\common\Const.java
?????文件???????3026??2020-05-31?10:50??springboot-tio-activemq\src\main\java\com\example\demo\common\intf\AbsCommonBsHandler.java
?????文件???????2165??2020-05-31?10:50??springboot-tio-activemq\src\main\java\com\example\demo\common\intf\AbsCommonBsHandlerIntf.java
?????文件???????2479??2020-05-31?10:50??springboot-tio-activemq\src\main\java\com\example\demo\common\SPPacket.java
?????文件???????2121??2020-05-31?10:50??springboot-tio-activemq\src\main\java\com\example\demo\common\Type.java
?????文件????????417??2020-05-31?10:50??springboot-tio-activemq\src\main\java\com\example\demo\DemoApplication.java
?????文件???????2363??2020-05-31?10:50??springboot-tio-activemq\src\main\java\com\example\demo\server\handler\HeartbeatReqHandler.java
?????文件???????2956??2020-05-31?10:50??springboot-tio-activemq\src\main\java\com\example\demo\server\handler\JJTSTReqHandler.java
?????文件???????2820??2020-05-31?10:50??springboot-tio-activemq\src\main\java\com\example\demo\server\handler\YYTSTReqHandler.java
?????文件???????3939??2020-05-31?10:50??springboot-tio-activemq\src\main\java\com\example\demo\server\SPServerAioHandler.java
?????文件???????3785??2020-05-31?10:50??springboot-tio-activemq\src\main\java\com\example\demo\server\SPServerAioListener.java
?????文件????????987??2020-05-31?10:50??springboot-tio-activemq\src\main\resources\application.yml
?????文件????????438??2020-05-31?10:50??springboot-tio-activemq\src\main\resources\logback.properties
?????文件???????4994??2020-05-31?10:50??springboot-tio-activemq\src\main\resources\logback.xm
?????文件????????901??2020-05-31?10:50??springboot-tio-activemq\src\test\java\com\example\demo\MqTest.java
............此處省略25個文件信息
評論
共有 條評論