-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #610 from vitruv-tools/vitruv-remote
Vitruv Remote with Server/Client
- Loading branch information
Showing
75 changed files
with
3,019 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,164 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>tools.vitruv</groupId> | ||
<artifactId>tools.vitruv.framework</artifactId> | ||
<version>3.1.0-SNAPSHOT</version> | ||
</parent> | ||
|
||
<artifactId>tools.vitruv.framework.remote</artifactId> | ||
|
||
<name>Vitruv V-SUM remote definition</name> | ||
<description /> | ||
|
||
<dependencies> | ||
<!-- project dependencies --> | ||
<dependency> | ||
<groupId>${project.groupId}</groupId> | ||
<artifactId>tools.vitruv.change.utils</artifactId> | ||
<version>${project.version}</version> | ||
<scope>compile</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>${project.groupId}</groupId> | ||
<artifactId>tools.vitruv.change.composite</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>${project.groupId}</groupId> | ||
<artifactId>tools.vitruv.change.propagation</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>${project.groupId}</groupId> | ||
<artifactId>tools.vitruv.change.correspondence</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>${project.groupId}</groupId> | ||
<artifactId>tools.vitruv.change.interaction</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>${project.groupId}</groupId> | ||
<artifactId>tools.vitruv.change.atomic</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>${project.groupId}</groupId> | ||
<artifactId>tools.vitruv.framework.views</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>${project.groupId}</groupId> | ||
<artifactId>tools.vitruv.framework.vsum</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
|
||
<!-- project test depencies --> | ||
<dependency> | ||
<groupId>${project.groupId}</groupId> | ||
<artifactId>tools.vitruv.change.testutils.metamodels</artifactId> | ||
<version>${project.version}</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>${project.groupId}</groupId> | ||
<artifactId>tools.vitruv.change.testutils.core</artifactId> | ||
<version>${project.version}</version> | ||
<scope>test</scope> | ||
</dependency> | ||
|
||
<!-- external dependencies --> | ||
<dependency> | ||
<groupId>com.google.guava</groupId> | ||
<artifactId>guava</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.eclipse.emf</groupId> | ||
<artifactId>org.eclipse.emf.common</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.eclipse.emf</groupId> | ||
<artifactId>org.eclipse.emf.ecore</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.eclipse.xtend</groupId> | ||
<artifactId>org.eclipse.xtend.lib</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>log4j</groupId> | ||
<artifactId>log4j</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>sdq-commons</groupId> | ||
<artifactId>edu.kit.ipd.sdq.commons.util.emf</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.eclipse.xtext</groupId> | ||
<artifactId>org.eclipse.xtext.xbase.lib</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.fasterxml.jackson.core</groupId> | ||
<artifactId>jackson-core</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.fasterxml.jackson.core</groupId> | ||
<artifactId>jackson-databind</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.fasterxml.jackson.core</groupId> | ||
<artifactId>jackson-annotations</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.eclipse.emfcloud</groupId> | ||
<artifactId>emfjson-jackson</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.micrometer</groupId> | ||
<artifactId>micrometer-core</artifactId> | ||
</dependency> | ||
|
||
|
||
<!-- external test dependencies --> | ||
<dependency> | ||
<groupId>org.hamcrest</groupId> | ||
<artifactId>hamcrest</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>xannotations</groupId> | ||
<artifactId>edu.kit.ipd.sdq.activextendannotations</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.junit.jupiter</groupId> | ||
<artifactId>junit-jupiter-api</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.junit.jupiter</groupId> | ||
<artifactId>junit-jupiter-params</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.junit.platform</groupId> | ||
<artifactId>junit-platform-commons</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.junit.platform</groupId> | ||
<artifactId>junit-platform-launcher</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>sdq-commons</groupId> | ||
<artifactId>edu.kit.ipd.sdq.commons.util.java</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
</dependencies> | ||
</project> |
11 changes: 11 additions & 0 deletions
11
remote/src/main/java/tools/vitruv/framework/remote/client/VitruvClient.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package tools.vitruv.framework.remote.client; | ||
|
||
import tools.vitruv.framework.views.ViewProvider; | ||
import tools.vitruv.framework.views.ViewTypeProvider; | ||
|
||
/** | ||
* A Vitruvius client can remotely access the available {@link tools.vitruv.framework.views.ViewType}s of a Vitruvius instance and query | ||
* {@link tools.vitruv.framework.views.ViewSelector}s in order to create remotely editable {@link tools.vitruv.framework.views.View}s. | ||
*/ | ||
public interface VitruvClient extends ViewTypeProvider, ViewProvider { | ||
} |
44 changes: 44 additions & 0 deletions
44
remote/src/main/java/tools/vitruv/framework/remote/client/VitruvClientFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
package tools.vitruv.framework.remote.client; | ||
|
||
import tools.vitruv.framework.remote.client.impl.VitruvRemoteConnection; | ||
import tools.vitruv.framework.remote.common.DefaultConnectionSettings; | ||
|
||
import java.nio.file.Path; | ||
|
||
public class VitruvClientFactory { | ||
/** | ||
* Creates a new {@link VitruvClient} using the given host name or IP address and the standard port of 8080. | ||
* | ||
* @param url The host name or IP address of the Vitruvius server. | ||
* @param temp A non-existing or empty directory for temporary files. | ||
* @return A {@link VitruvClient}. | ||
*/ | ||
public static VitruvClient create(String url, Path temp) { | ||
return create(url, DefaultConnectionSettings.STD_PORT, temp); | ||
} | ||
|
||
/** | ||
* Creates a new {@link VitruvClient} using the given host name or IP address and port. | ||
* | ||
* @param hostOrIp The host name or IP address of the Vitruvius server. | ||
* @param port Port of the Vitruvius server. | ||
* @param temp A non-existing or empty directory for temporary files. | ||
* @return A {@link VitruvClient}. | ||
*/ | ||
public static VitruvClient create(String hostOrIp, int port, Path temp) { | ||
return create(DefaultConnectionSettings.STD_PROTOCOL, hostOrIp, port, temp); | ||
} | ||
|
||
/** | ||
* Creates a new {@link VitruvClient} using the given protocol, host name or IP address, and port. | ||
* | ||
* @param protocol The protocol. | ||
* @param hostOrIp The host name of IP address of the Vitruvius server. | ||
* @param port Port of the Vitruvius server. | ||
* @param temp A non-existing or empty directory for temporary files. | ||
* @return A {@link VitruvClient}. | ||
*/ | ||
public static VitruvClient create(String protocol, String hostOrIp, int port, Path temp) { | ||
return new VitruvRemoteConnection(protocol, hostOrIp, port, temp); | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
.../main/java/tools/vitruv/framework/remote/client/exception/BadClientResponseException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package tools.vitruv.framework.remote.client.exception; | ||
|
||
public class BadClientResponseException extends RuntimeException { | ||
public BadClientResponseException() { | ||
super(); | ||
} | ||
|
||
public BadClientResponseException(String msg) { | ||
super(msg); | ||
} | ||
|
||
public BadClientResponseException(String msg, Throwable cause) { | ||
super(msg, cause); | ||
} | ||
|
||
public BadClientResponseException(Throwable cause) { | ||
super(cause); | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
.../main/java/tools/vitruv/framework/remote/client/exception/BadServerResponseException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package tools.vitruv.framework.remote.client.exception; | ||
|
||
public class BadServerResponseException extends RuntimeException { | ||
private int statusCode = -1; | ||
|
||
public BadServerResponseException() { | ||
super(); | ||
} | ||
|
||
public BadServerResponseException(String msg) { | ||
super(msg); | ||
} | ||
|
||
public BadServerResponseException(String msg, int statusCode) { | ||
super(msg); | ||
this.statusCode = statusCode; | ||
} | ||
|
||
public BadServerResponseException(String msg, Throwable cause) { | ||
super(msg, cause); | ||
} | ||
|
||
public BadServerResponseException(Throwable cause) { | ||
super(cause); | ||
} | ||
|
||
public int getStatusCode() { | ||
return statusCode; | ||
} | ||
} |
4 changes: 4 additions & 0 deletions
4
remote/src/main/java/tools/vitruv/framework/remote/client/exception/package-info.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/** | ||
* This package defines exceptions for the Vitruvius client. | ||
*/ | ||
package tools.vitruv.framework.remote.client.exception; |
Oops, something went wrong.