|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ProjectConnection
Represents a long-lived connection to a Gradle project.
All implementations of GradleConnection
are thread-safe, and may be shared by any number of threads.
All notifications from a given GradleConnection
instance are delivered by a single thread at a time. Note, however, that the delivery thread may change over time.
Method Summary | ||
---|---|---|
void |
close()
Closes this connection. |
|
|
getModel(Class<T> viewType)
Fetches a snapshot of the model of the given type for this project. |
|
|
getModel(Class<T> viewType,
ResultHandler<? super T> handler)
Fetches a snapshot of the model for this project asynchronously. |
|
|
model(Class<T> modelType)
Creates a builder which can be used to build the model of the given type. |
|
BuildLauncher |
newBuild()
Creates a launcher which can be used to execute a build. |
Method Detail |
---|
<T extends Project> T getModel(Class<T> viewType) throws GradleConnectionException
This method blocks until the model is available.
T
- The model type.viewType
- The model type.
UnsupportedVersionException
- When the target Gradle version does not support the given model.
BuildException
- On some failure executing the Gradle build, in order to build the model.
GradleConnectionException
- On some other failure using the connection.
IllegalStateException
- When this connection has been closed or is closing.<T extends Project> void getModel(Class<T> viewType, ResultHandler<? super T> handler) throws IllegalStateException
T
- The model type.viewType
- The model type.handler
- The handler to pass the result to.
IllegalStateException
- When this connection has been closed or is closing.BuildLauncher newBuild()
<T extends Project> ModelBuilder<T> model(Class<T> modelType)
T
- The model type.modelType
- The model type
void close()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |