summaryrefslogtreecommitdiff
path: root/java
diff options
context:
space:
mode:
authorBrenton Bostick <[email protected]>2023-03-14 14:52:59 -0400
committerBrenton Bostick <[email protected]>2023-08-16 09:18:06 -0400
commit0806b881eab9425275275f60b14ba2f23ec04c85 (patch)
tree81e0afed16a80f829ce89078a28b887ae9146636 /java
parentead68038a3085072f40a869118725eafec94998a (diff)
Basic cleanups
Diffstat (limited to 'java')
-rw-r--r--java/src/com/zerotier/sdk/Event.java10
-rw-r--r--java/src/com/zerotier/sdk/Node.java2
-rw-r--r--java/src/com/zerotier/sdk/NodeStatus.java2
-rw-r--r--java/src/com/zerotier/sdk/PathChecker.java8
-rw-r--r--java/src/com/zerotier/sdk/Peer.java2
-rw-r--r--java/src/com/zerotier/sdk/PeerPhysicalPath.java2
-rw-r--r--java/src/com/zerotier/sdk/PeerRole.java2
-rw-r--r--java/src/com/zerotier/sdk/VirtualNetworkConfig.java6
-rw-r--r--java/src/com/zerotier/sdk/VirtualNetworkConfigListener.java4
-rw-r--r--java/src/com/zerotier/sdk/VirtualNetworkConfigOperation.java2
-rw-r--r--java/src/com/zerotier/sdk/VirtualNetworkDNS.java3
-rw-r--r--java/src/com/zerotier/sdk/VirtualNetworkRoute.java3
-rw-r--r--java/src/com/zerotier/sdk/VirtualNetworkStatus.java2
-rw-r--r--java/src/com/zerotier/sdk/VirtualNetworkType.java2
14 files changed, 26 insertions, 24 deletions
diff --git a/java/src/com/zerotier/sdk/Event.java b/java/src/com/zerotier/sdk/Event.java
index fbc016c6..c55da2cc 100644
--- a/java/src/com/zerotier/sdk/Event.java
+++ b/java/src/com/zerotier/sdk/Event.java
@@ -29,14 +29,14 @@ package com.zerotier.sdk;
/**
* Status codes sent to status update callback when things happen
- *
+ * <p>
* Defined in ZeroTierOne.h as ZT_Event
*/
public enum Event {
/**
* Node has been initialized
- *
+ * <p>
* This is the first event generated, and is always sent. It may occur
* before Node's constructor returns.
*/
@@ -49,7 +49,7 @@ public enum Event {
/**
* Node is online -- at least one upstream node appears reachable
- *
+ * <p>
* Meta-data: none
*/
EVENT_ONLINE(2),
@@ -104,7 +104,7 @@ public enum Event {
/**
* VERB_USER_MESSAGE received
- *
+ * <p>
* These are generated when a VERB_USER_MESSAGE packet is received via
* ZeroTier VL1.
*/
@@ -112,7 +112,7 @@ public enum Event {
/**
* Remote trace received
- *
+ * <p>
* These are generated when a VERB_REMOTE_TRACE is received. Note
* that any node can fling one of these at us. It is your responsibility
* to filter and determine if it's worth paying attention to. If it's
diff --git a/java/src/com/zerotier/sdk/Node.java b/java/src/com/zerotier/sdk/Node.java
index a3f3ab47..7ba269e6 100644
--- a/java/src/com/zerotier/sdk/Node.java
+++ b/java/src/com/zerotier/sdk/Node.java
@@ -299,7 +299,7 @@ public class Node {
/**
* Add or update a moon
- *
+ * <p>
* Moons are persisted in the data store in moons.d/, so this can persist
* across invocations if the contents of moon.d are scanned and orbit is
* called for each on startup.
diff --git a/java/src/com/zerotier/sdk/NodeStatus.java b/java/src/com/zerotier/sdk/NodeStatus.java
index 1172650b..04c3ee60 100644
--- a/java/src/com/zerotier/sdk/NodeStatus.java
+++ b/java/src/com/zerotier/sdk/NodeStatus.java
@@ -31,7 +31,7 @@ import com.zerotier.sdk.util.StringUtils;
/**
* Current node status
- *
+ * <p>
* Defined in ZeroTierOne.h as ZT_NodeStatus
*/
public class NodeStatus {
diff --git a/java/src/com/zerotier/sdk/PathChecker.java b/java/src/com/zerotier/sdk/PathChecker.java
index cfc97d60..66a297dc 100644
--- a/java/src/com/zerotier/sdk/PathChecker.java
+++ b/java/src/com/zerotier/sdk/PathChecker.java
@@ -11,9 +11,9 @@ public interface PathChecker {
/**
* Callback to check whether a path should be used for ZeroTier traffic
- *
+ * <p>
* This function must return true if the path should be used.
- *
+ * <p>
* If no path check function is specified, ZeroTier will still exclude paths
* that overlap with ZeroTier-assigned and managed IP address blocks. But the
* use of a path check function is recommended to ensure that recursion does
@@ -22,7 +22,7 @@ public interface PathChecker {
* all configured ZeroTier interfaces and check to ensure that the supplied
* addresses will not result in ZeroTier traffic being sent over a ZeroTier
* interface (recursion).
- *
+ * <p>
* Obviously this is not required in configurations where this can't happen,
* such as network containers or embedded.
*
@@ -35,7 +35,7 @@ public interface PathChecker {
/**
* Function to get physical addresses for ZeroTier peers
- *
+ * <p>
* If provided this function will be occasionally called to get physical
* addresses that might be tried to reach a ZeroTier address.
*
diff --git a/java/src/com/zerotier/sdk/Peer.java b/java/src/com/zerotier/sdk/Peer.java
index e3d54438..de7d64e5 100644
--- a/java/src/com/zerotier/sdk/Peer.java
+++ b/java/src/com/zerotier/sdk/Peer.java
@@ -33,7 +33,7 @@ import java.util.Arrays;
/**
* Peer status result buffer
- *
+ * <p>
* Defined in ZeroTierOne.h as ZT_Peer
*/
public class Peer {
diff --git a/java/src/com/zerotier/sdk/PeerPhysicalPath.java b/java/src/com/zerotier/sdk/PeerPhysicalPath.java
index f6d32642..849725b5 100644
--- a/java/src/com/zerotier/sdk/PeerPhysicalPath.java
+++ b/java/src/com/zerotier/sdk/PeerPhysicalPath.java
@@ -31,7 +31,7 @@ import java.net.InetSocketAddress;
/**
* Physical network path to a peer
- *
+ * <p>
* Defined in ZeroTierOne.h as ZT_PeerPhysicalPath
*/
public class PeerPhysicalPath {
diff --git a/java/src/com/zerotier/sdk/PeerRole.java b/java/src/com/zerotier/sdk/PeerRole.java
index d69a1f1b..e05ba4a3 100644
--- a/java/src/com/zerotier/sdk/PeerRole.java
+++ b/java/src/com/zerotier/sdk/PeerRole.java
@@ -29,7 +29,7 @@ package com.zerotier.sdk;
/**
* What trust hierarchy role does this peer have?
- *
+ * <p>
* Defined in ZeroTierOne.h as ZT_PeerRole
*/
public enum PeerRole {
diff --git a/java/src/com/zerotier/sdk/VirtualNetworkConfig.java b/java/src/com/zerotier/sdk/VirtualNetworkConfig.java
index bcf64854..6245436a 100644
--- a/java/src/com/zerotier/sdk/VirtualNetworkConfig.java
+++ b/java/src/com/zerotier/sdk/VirtualNetworkConfig.java
@@ -38,7 +38,7 @@ import java.util.Collections;
/**
* Virtual network configuration
- *
+ * <p>
* Defined in ZeroTierOne.h as ZT_VirtualNetworkConfig
*/
public class VirtualNetworkConfig implements Comparable<VirtualNetworkConfig> {
@@ -374,11 +374,11 @@ public class VirtualNetworkConfig implements Comparable<VirtualNetworkConfig> {
/**
* ZeroTier-assigned addresses (in {@link InetSocketAddress} objects)
- *
+ * <p>
* For IP, the port number of the sockaddr_XX structure contains the number
* of bits in the address netmask. Only the IP address and port are used.
* Other fields like interface number can be ignored.
- *
+ * <p>
* This is only used for ZeroTier-managed address assignments sent by the
* virtual network's configuration master.
*/
diff --git a/java/src/com/zerotier/sdk/VirtualNetworkConfigListener.java b/java/src/com/zerotier/sdk/VirtualNetworkConfigListener.java
index ce91e79d..7c140bd7 100644
--- a/java/src/com/zerotier/sdk/VirtualNetworkConfigListener.java
+++ b/java/src/com/zerotier/sdk/VirtualNetworkConfigListener.java
@@ -36,14 +36,14 @@ public interface VirtualNetworkConfigListener {
* <p>This can be called at any time to update the configuration of a virtual
* network port. The parameter after the network ID specifies whether this
* port is being brought up, updated, brought down, or permanently deleted.
- *
+ * <p>
* This in turn should be used by the underlying implementation to create
* and configure tap devices at the OS (or virtual network stack) layer.</P>
*
* This should not call {@link Node#multicastSubscribe(long, long)} or other network-modifying
* methods, as this could cause a deadlock in multithreaded or interrupt
* driven environments.
- *
+ * <p>
* This must return 0 on success. It can return any OS-dependent error code
* on failure, and this results in the network being placed into the
* PORT_ERROR state.
diff --git a/java/src/com/zerotier/sdk/VirtualNetworkConfigOperation.java b/java/src/com/zerotier/sdk/VirtualNetworkConfigOperation.java
index a1981bd1..59837a6b 100644
--- a/java/src/com/zerotier/sdk/VirtualNetworkConfigOperation.java
+++ b/java/src/com/zerotier/sdk/VirtualNetworkConfigOperation.java
@@ -29,7 +29,7 @@ package com.zerotier.sdk;
/**
* Virtual network configuration update type
- *
+ * <p>
* Defined in ZeroTierOne.h as ZT_VirtualNetworkConfigOperation
*/
public enum VirtualNetworkConfigOperation {
diff --git a/java/src/com/zerotier/sdk/VirtualNetworkDNS.java b/java/src/com/zerotier/sdk/VirtualNetworkDNS.java
index 6e4bb3d2..48d24046 100644
--- a/java/src/com/zerotier/sdk/VirtualNetworkDNS.java
+++ b/java/src/com/zerotier/sdk/VirtualNetworkDNS.java
@@ -10,7 +10,7 @@ import java.util.ArrayList;
/**
* DNS configuration to be pushed on a virtual network
- *
+ * <p>
* Defined in ZeroTierOne.h as ZT_VirtualNetworkDNS
*/
public class VirtualNetworkDNS implements Comparable<VirtualNetworkDNS> {
@@ -45,6 +45,7 @@ public class VirtualNetworkDNS implements Comparable<VirtualNetworkDNS> {
return false;
}
+ //noinspection RedundantIfStatement
if (!servers.equals(d.servers)) {
return false;
}
diff --git a/java/src/com/zerotier/sdk/VirtualNetworkRoute.java b/java/src/com/zerotier/sdk/VirtualNetworkRoute.java
index afd9ee45..ec569813 100644
--- a/java/src/com/zerotier/sdk/VirtualNetworkRoute.java
+++ b/java/src/com/zerotier/sdk/VirtualNetworkRoute.java
@@ -31,7 +31,7 @@ import java.net.InetSocketAddress;
/**
* A route to be pushed on a virtual network
- *
+ * <p>
* Defined in ZeroTierOne.h as ZT_VirtualNetworkRoute
*/
public class VirtualNetworkRoute implements Comparable<VirtualNetworkRoute>
@@ -126,6 +126,7 @@ public class VirtualNetworkRoute implements Comparable<VirtualNetworkRoute>
return false;
}
+ //noinspection RedundantIfStatement
if (metric != other.metric) {
return false;
}
diff --git a/java/src/com/zerotier/sdk/VirtualNetworkStatus.java b/java/src/com/zerotier/sdk/VirtualNetworkStatus.java
index 8a32ba6a..9539bdcc 100644
--- a/java/src/com/zerotier/sdk/VirtualNetworkStatus.java
+++ b/java/src/com/zerotier/sdk/VirtualNetworkStatus.java
@@ -29,7 +29,7 @@ package com.zerotier.sdk;
/**
* Virtual network status codes
- *
+ * <p>
* Defined in ZeroTierOne.h as ZT_VirtualNetworkStatus
*/
public enum VirtualNetworkStatus {
diff --git a/java/src/com/zerotier/sdk/VirtualNetworkType.java b/java/src/com/zerotier/sdk/VirtualNetworkType.java
index 44be8864..5c1239c0 100644
--- a/java/src/com/zerotier/sdk/VirtualNetworkType.java
+++ b/java/src/com/zerotier/sdk/VirtualNetworkType.java
@@ -29,7 +29,7 @@ package com.zerotier.sdk;
/**
* Virtual network type codes
- *
+ * <p>
* Defined in ZeroTierOne.h as ZT_VirtualNetworkType
*/
public enum VirtualNetworkType {