File tree Expand file tree Collapse file tree 3 files changed +21
-21
lines changed
src/main/java/org/cryptomator/integrations/mount Expand file tree Collapse file tree 3 files changed +21
-21
lines changed Original file line number Diff line number Diff line change 1313 */
1414public interface MountBuilder {
1515
16+ /**
17+ * Use the given TCP port of the loopback address.
18+ *
19+ * @param port Fixed TCP port or 0 to use a system-assigned port
20+ * @return <code>this</code>
21+ * @throws UnsupportedOperationException If {@link MountFeature#LOOPBACK_PORT} is not supported
22+ */
23+ @ Contract ("_ -> this" )
24+ default MountBuilder setLoopbackPort (@ Range (from = 0 , to = Short .MAX_VALUE ) int port ) {
25+ throw new UnsupportedOperationException ();
26+ }
27+
1628 /**
1729 * Sets the mount point.
1830 * <p>
@@ -39,17 +51,6 @@ default MountBuilder setMountFlags(String mountFlags) {
3951 throw new UnsupportedOperationException ();
4052 }
4153
42- /**
43- * Use the given TCP port.
44- *
45- * @param port Fixed TCP port or 0 to use a system-assigned port
46- * @return <code>this</code>
47- * @throws UnsupportedOperationException If {@link MountFeature#PORT} is not supported
48- */
49- @ Contract ("_ -> this" )
50- default MountBuilder setPort (@ Range (from = 0 , to = Short .MAX_VALUE ) int port ) {
51- throw new UnsupportedOperationException ();
52- }
5354
5455 /**
5556 * Instructs the mount to be read-only.
Original file line number Diff line number Diff line change 88 * This may be used to show or hide different configuration options depending on the chosen mount provider.
99 */
1010public enum MountFeature {
11+ /**
12+ * The provider supports {@link MountProvider#getDefaultLoopbackPort()}
13+ * and the builder requires {@link MountBuilder#setLoopbackPort(int)}.
14+ */
15+ LOOPBACK_PORT ,
16+
1117 /**
1218 * The provider supports {@link MountProvider#getDefaultMountFlags(String)}
1319 * and the builder requires {@link MountBuilder#setMountFlags(String)}.
@@ -47,12 +53,6 @@ public enum MountFeature {
4753 */
4854 MOUNT_TO_SYSTEM_CHOSEN_PATH ,
4955
50- /**
51- * The provider supports {@link MountProvider#getDefaultPort()}
52- * and the builder requires {@link MountBuilder#setPort(int)}.
53- */
54- PORT ,
55-
5656 /**
5757 * The builder supports {@link MountBuilder#setReadOnly(boolean)}.
5858 */
Original file line number Diff line number Diff line change 22
33import org .cryptomator .integrations .common .IntegrationsLoader ;
44import org .jetbrains .annotations .Contract ;
5- import org .jetbrains .annotations .NotNull ;
65import org .jetbrains .annotations .Range ;
76
87import java .nio .file .Path ;
@@ -52,13 +51,13 @@ default String getDefaultMountFlags(String mountName) {
5251 }
5352
5453 /**
55- * The default TCP port used by this provider.
54+ * The default TCP port of the loopback address used by this provider.
5655 *
5756 * @return fixed TCP port or 0 to use a system-assigned port
58- * @throws UnsupportedOperationException If {@link MountFeature#PORT } is not supported
57+ * @throws UnsupportedOperationException If {@link MountFeature#LOOPBACK_PORT } is not supported
5958 */
6059 @ Range (from = 0 , to = Short .MAX_VALUE )
61- default int getDefaultPort () {
60+ default int getDefaultLoopbackPort () {
6261 throw new UnsupportedOperationException ();
6362 }
6463
You can’t perform that action at this time.
0 commit comments