Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Nov 26, 2020. It is now read-only.
/JxnetPublic archive

Commit3ef28eb

Browse files
committed
Update lib version, remove unneeded classes, remove jvm info
1 parent8e6bc91 commit3ef28eb

File tree

12 files changed

+18
-179
lines changed

12 files changed

+18
-179
lines changed

‎README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Getting Started
3232
- Linux (x86/x86_64)
3333
- Mac OS
3434
-#####Java Version
35-
- Java8 (or newer)
35+
- Java6 (java 8 required if you are using spring-boot)
3636
-#####Dependecies
3737
- Windows
3838
- Winpcap or Npcap

‎VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.5.5.RC3
1+
1.5.5.RC4

‎gradle/configure.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ ext {
3131
PMD_VERION='6.10.0'
3232
JACOCO_VERSION='0.8.2'
3333

34-
COMMON_VERSION='1.2.7.RC5'
35-
JXPACKET_VERSION='1.2.3.RC4'
34+
COMMON_VERSION='1.2.7.RELEASE'
35+
JXPACKET_VERSION='1.2.3.RELEASE'
3636
REACTOR_VERSION='Californium-RELEASE'
3737
JNR_VERSION='2.1.9'
3838

‎jxnet-benchmark/src/main/java/com/ardikars/jxnet/benchmark/jxnet/config/SpringJxnetRunnerConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
* @author <a href="mailto:contact@ardikars.com">Ardika Rommy Sanjaya</a>
3232
*/
3333
@Configuration("springJxnetRunnerConfig")
34-
@EnablePacket(packetHandlerType =PacketHandlerType.JXPACKET)
34+
@EnablePacket(packetHandlerType =PacketHandlerType.JXPACKET_RAW)
3535
publicclassSpringJxnetRunnerConfigimplementsJxpacketHandler<String> {
3636

3737
@Override

‎jxnet-benchmark/src/main/resources/application.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
jxnet.file=${PCAP_FILE:file.pcapng}
1+
jxnet.file=${PCAP_FILE:/tmp/dump.pcap}
22

33
jxnet.pcapType=offline
44
jxnet.numberOfThread=${NUMBER_OF_THREAD:}

‎jxnet-example/build.gradle

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@
66
description='Jxnet example application.'
77

88
dependencies {
9-
implementation ("com.ardikars.common:common-annotation")
10-
implementation ("com.ardikars.common:common-util")
11-
implementation ("com.ardikars.common:common-net")
12-
implementation ("com.ardikars.common:common-tuple")
13-
implementation ("com.ardikars.common:common-memory")
14-
implementation ("com.ardikars.jxpacket:jxpacket-common:1.2.3.RC")
15-
implementation ("com.ardikars.jxpacket:jxpacket-core:1.2.3.RC")
16-
implementation project (":jxnet-core")
17-
implementation project (":jxnet-context")
9+
compile ("com.ardikars.common:common-annotation")
10+
compile ("com.ardikars.common:common-util")
11+
compile ("com.ardikars.common:common-net")
12+
compile ("com.ardikars.common:common-tuple")
13+
compile ("com.ardikars.common:common-memory")
14+
compile ("com.ardikars.jxpacket:jxpacket-common:1.2.3.RC")
15+
compile ("com.ardikars.jxpacket:jxpacket-core:1.2.3.RC")
16+
compile project (":jxnet-core")
17+
compile project (":jxnet-context")
1818
testImplementation ("junit:junit:${JUNIT_VERSION}")
1919
testImplementation ("org.mockito:mockito-core:${MOCKITO_VERSION}")
2020
}

‎jxnet-spring-boot-autoconfigure/src/main/java/com/ardikars/jxnet/spring/boot/autoconfigure/JxnetAutoConfiguration.java

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
importstaticcom.ardikars.jxnet.spring.boot.autoconfigure.constant.JxnetObjectName.DATALINK_TYPE_BEAN_NAME;
2525
importstaticcom.ardikars.jxnet.spring.boot.autoconfigure.constant.JxnetObjectName.ERRBUF_BEAN_NAME;
2626
importstaticcom.ardikars.jxnet.spring.boot.autoconfigure.constant.JxnetObjectName.EXECUTOR_SERVICE_BEAN_NAME;
27-
importstaticcom.ardikars.jxnet.spring.boot.autoconfigure.constant.JxnetObjectName.JVM_BEAN_NAME;
2827
importstaticcom.ardikars.jxnet.spring.boot.autoconfigure.constant.JxnetObjectName.JXNET_AUTO_CONFIGURATION_BEAN_NAME;
2928
importstaticcom.ardikars.jxnet.spring.boot.autoconfigure.constant.JxnetObjectName.MAC_ADDRESS_BEAN_NAME;
3029
importstaticcom.ardikars.jxnet.spring.boot.autoconfigure.constant.JxnetObjectName.NETMASK_BEAN_NAME;
@@ -36,7 +35,6 @@
3635
importcom.ardikars.common.net.Inet4Address;
3736
importcom.ardikars.common.net.MacAddress;
3837
importcom.ardikars.common.util.Platforms;
39-
importcom.ardikars.common.util.management.Jvm;
4038
importcom.ardikars.jxnet.DataLinkType;
4139
importcom.ardikars.jxnet.Jxnet;
4240
importcom.ardikars.jxnet.Pcap;
@@ -343,13 +341,4 @@ public Context context(@Qualifier(PCAP_BUILDER_BEAN_NAME) Pcap.Builder builder,
343341
returncontext;
344342
}
345343

346-
/**
347-
* Get {@link Jvm}.
348-
* @return returns {@link Jvm}.
349-
*/
350-
@Bean(JVM_BEAN_NAME)
351-
publicJvmjvm() {
352-
returnproperties.getJvm();
353-
}
354-
355344
}

‎jxnet-spring-boot-autoconfigure/src/main/java/com/ardikars/jxnet/spring/boot/autoconfigure/JxnetConfigurationProperties.java

Lines changed: 3 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@
1919

2020
importcom.ardikars.common.logging.Logger;
2121
importcom.ardikars.common.logging.LoggerFactory;
22-
importcom.ardikars.common.util.management.Jvm;
23-
importcom.ardikars.common.util.management.Jvms;
2422
importcom.ardikars.jxnet.BpfProgram;
2523
importcom.ardikars.jxnet.DataLinkType;
2624
importcom.ardikars.jxnet.ImmediateMode;
@@ -80,8 +78,6 @@ public class JxnetConfigurationProperties {
8078

8179
privateIntegernumberOfThread;
8280

83-
privateJvmjvm;
84-
8581
/**
8682
* Initialize properties.
8783
*/
@@ -101,7 +97,9 @@ public JxnetConfigurationProperties() {
10197
}
10298
pcap();
10399
bpf();
104-
jvm();
100+
if (numberOfThread ==null) {
101+
numberOfThread =Runtime.getRuntime().availableProcessors();
102+
}
105103
log();
106104
}
107105

@@ -141,22 +139,6 @@ private void bpf() {
141139
}
142140
}
143141

144-
privatevoidjvm() {
145-
try {
146-
jvm =Jvms.getJvm();
147-
if (numberOfThread ==null) {
148-
if (jvm.hasJvm()) {
149-
numberOfThread =jvm.getAvailableProcessors();
150-
}else {
151-
numberOfThread =0;
152-
}
153-
}
154-
}catch (Exceptione) {
155-
jvm =null;
156-
LOGGER.warn(e.getMessage());
157-
}
158-
}
159-
160142
privatevoidlog() {
161143
LOGGER.debug("Source : {}",source);
162144
LOGGER.debug("Snapshot length : {}",snapshot);
@@ -304,8 +286,4 @@ public void setNumberOfThread(Integer numberOfThread) {
304286
this.numberOfThread =numberOfThread;
305287
}
306288

307-
publicJvmgetJvm() {
308-
returnjvm;
309-
}
310-
311289
}

‎jxnet-spring-boot-autoconfigure/src/main/java/com/ardikars/jxnet/spring/boot/autoconfigure/NioAsyncBufferHandler.java

Lines changed: 0 additions & 34 deletions
This file was deleted.

‎jxnet-spring-boot-autoconfigure/src/main/java/com/ardikars/jxnet/spring/boot/autoconfigure/NioBufferHandler.java

Lines changed: 0 additions & 34 deletions
This file was deleted.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp