-
Notifications
You must be signed in to change notification settings - Fork 4.6k
/
JavaDebugOptions.java
79 lines (71 loc) · 2.6 KB
/
JavaDebugOptions.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
/*
* Copyright 2019 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
*
* 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 org.gradle.process;
import org.gradle.api.Incubating;
import org.gradle.api.provider.Property;
import org.gradle.api.tasks.Input;
import org.gradle.api.tasks.Optional;
/**
* Contains a subset of the <a href="https://docs.oracle.com/javase/8/docs/technotes/guides/jpda/conninv.html">Java Debug Wire Protocol</a> properties.
*
* @since 5.6
*/
public interface JavaDebugOptions {
/**
* Should the debug agent start in the forked process? By default, this is false.
*/
@Input
Property<Boolean> getEnabled();
/**
* Host address to listen on or connect to when debug is enabled. By default, no host is set.
*
* <p>
* When run in {@link #getServer() server} mode, the process listens on the loopback address on Java 9+ and all interfaces on Java 8 and below by default.
* Setting host to {@code *} will make the process listen on all network interfaces. This is not supported on Java 8 and below.
* Setting host to anything else will make the process listen on that address.
* </p>
* <p>
* When run in {@link #getServer() client} mode, the process attempts to connect to the given host and {@link #getPort()}.
* </p>
*
* @since 7.6
*/
@Incubating
@Optional
@Input
Property<String> getHost();
/**
* The debug port to listen on or connect to.
*/
@Input
Property<Integer> getPort();
/**
* Should the process listen for a debugger to attach (server) or immediately connect to an already running debugger (client)?
* <p>
* In server mode ({@code server = true}), the process listens for a debugger to connect after the JVM starts up.
* </p>
* <p>
* In client mode ({@code server = false}), the process attempts to connect to an already running debugger.
* </p>
*/
@Input
Property<Boolean> getServer();
/**
* Should the process suspend until the connection to the debugger is established?
*/
@Input
Property<Boolean> getSuspend();
}