> ending methods
37 |
38 | ## Deploy on Herd
39 |
40 | mvn -Dceylon.username=FroMage -Dceylon.password=XXX \
41 | -Dceylon.out=https://modules.ceylon-lang.org/uploads/YYY/repo/ \
42 | -pl vertx-lang-ceylon,vertx-lang-ceylon-stack \
43 | org.ceylon-lang:ceylon-maven-plugin:copy@publish-herd
44 |
--------------------------------------------------------------------------------
/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | io.vertx
6 | vertx-parent
7 | 14
8 |
9 |
10 | 4.0.0
11 |
12 | vertx-lang-ceylon-parent
13 | 3.6.0-SNAPSHOT
14 | pom
15 |
16 |
17 | ${project.basedir}/src/main/asciidoc
18 | ${java.home}/../lib/tools.jar
19 | 3.6.0-SNAPSHOT
20 |
21 |
22 |
23 |
24 |
25 | io.vertx
26 | vertx-dependencies
27 | ${stack.version}
28 | pom
29 | import
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 | vertx-lang-ceylon-doc
39 | vertx-lang-ceylon
40 | vertx-lang-ceylon-stack
41 |
42 |
43 |
44 |
45 |
46 |
47 | org.ceylon-lang
48 | ceylon-maven-plugin
49 | 1.3.3
50 |
51 |
52 |
53 |
54 |
55 |
56 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon-doc/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 | io.vertx
8 | vertx-lang-ceylon-parent
9 | 3.6.0-SNAPSHOT
10 |
11 |
12 | 4.0.0
13 |
14 | vertx-lang-ceylon-doc
15 | 3.6.0-SNAPSHOT
16 |
17 |
18 | ${project.basedir}/src/main/asciidoc
19 | ${java.home}/../lib/tools.jar
20 | ${project.basedir}/../target/repo
21 |
22 |
23 |
24 |
25 |
26 | io.vertx
27 | vertx-codetrans
28 |
29 |
30 | io.vertx
31 | vertx-docgen
32 |
33 |
34 |
35 | com.sun
36 | tools
37 | 1.8
38 | system
39 | ${tools.jar}
40 | true
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon-doc/src/main/java/io/vertx/codetrans/lang/ceylon/CeylonLang.java:
--------------------------------------------------------------------------------
1 | package io.vertx.codetrans.lang.ceylon;
2 |
3 | import io.vertx.codetrans.CodeBuilder;
4 | import io.vertx.codetrans.Lang;
5 | import io.vertx.codetrans.Script;
6 |
7 | /**
8 | * @author Julien Viet
9 | */
10 | public class CeylonLang implements Lang {
11 |
12 | @Override
13 | public String id() {
14 | return "ceylon";
15 | }
16 |
17 | @Override
18 | public Script loadScript(ClassLoader loader, String path, String method) throws Exception {
19 | throw new UnsupportedOperationException("not yet implemented");
20 | }
21 |
22 | @Override
23 | public String getExtension() {
24 | return "ceylon";
25 | }
26 |
27 | @Override
28 | public CodeBuilder codeBuilder() {
29 | return new CeylonCodeBuilder();
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon-doc/src/main/resources/META-INF/services/io.vertx.docgen.DocGenerator:
--------------------------------------------------------------------------------
1 | io.vertx.docgen.lang.ceylon.CeylonDocGenerator
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/.ceylon/config:
--------------------------------------------------------------------------------
1 |
2 | [defaults]
3 | offline=false
4 | flatclasspath=false
5 | autoexportmavendependencies=false
6 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/.ceylon/config~:
--------------------------------------------------------------------------------
1 |
2 | [defaults]
3 | offline=false
4 | flatclasspath=false
5 | autoexportmavendependencies=false
6 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/.ceylon/ide-config:
--------------------------------------------------------------------------------
1 |
2 | [project]
3 | compile-jvm=true
4 | compile-js=false
5 | system-repository=
6 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/.ceylon/ide-config~:
--------------------------------------------------------------------------------
1 |
2 | [project]
3 | compile-jvm=true
4 | compile-js=false
5 | system-repository=
6 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/descriptors/com.mchange.c3p0.properties:
--------------------------------------------------------------------------------
1 | +java.base=7
2 | +java.jdbc=7
3 | +java.management=7
4 | +javax.naming=7
5 | +com.mchange.mchange-commons-java=0.2.11
6 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/descriptors/com.mchange.mchange-commons-java.properties:
--------------------------------------------------------------------------------
1 | +java.base=7
2 | +java.desktop=7
3 | +java.jdbc=7
4 | +java.logging=7
5 | +java.rmi=7
6 | +javax.naming=7
7 | +javax.xml=7
8 | # com.typesafe.config ????
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/descriptors/com.zaxxer.HikariCP.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vert-x3/vertx-lang-ceylon/b63446c7b3b9fe7d0eeccb7e3ac3254909e93c19/vertx-lang-ceylon-stack/descriptors/com.zaxxer.HikariCP.properties
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/descriptors/commons-beanutils.commons-beanutils.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vert-x3/vertx-lang-ceylon/b63446c7b3b9fe7d0eeccb7e3ac3254909e93c19/vertx-lang-ceylon-stack/descriptors/commons-beanutils.commons-beanutils.properties
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/descriptors/io.vertx.vertx-auth-common.properties:
--------------------------------------------------------------------------------
1 | +java.base=7
2 | +io.vertx.vertx-core=${project.version}
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/descriptors/io.vertx.vertx-auth-htdigest.properties:
--------------------------------------------------------------------------------
1 | +java.base=7
2 | +io.vertx.vertx-auth-common=${project.version}
3 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/descriptors/io.vertx.vertx-auth-jdbc.properties:
--------------------------------------------------------------------------------
1 | +java.base=7
2 | +io.vertx.vertx-jdbc-client=${project.version}
3 | +io.vertx.vertx-auth-common=${project.version}
4 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/descriptors/io.vertx.vertx-auth-jwt.properties:
--------------------------------------------------------------------------------
1 | +java.base=7
2 | +io.vertx.vertx-auth-common=${project.version}
3 | +io.vertx.vertx-jwt=${project.version}
4 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/descriptors/io.vertx.vertx-auth-oauth2.properties:
--------------------------------------------------------------------------------
1 | +java.base=7
2 | +io.vertx.vertx-core=${project.version}
3 | +io.vertx.vertx-auth-common=${project.version}
4 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/descriptors/io.vertx.vertx-auth-shiro.properties:
--------------------------------------------------------------------------------
1 | +java.base=7
2 | +io.vertx.vertx-core=${project.version}
3 | +io.vertx.vertx-auth-common=${project.version}
4 | +org.apache.shiro.shiro-core=1.2.4
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/descriptors/io.vertx.vertx-bridge-common.properties:
--------------------------------------------------------------------------------
1 | +java.base=7
2 | +io.vertx.vertx-core=${project.version}
3 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/descriptors/io.vertx.vertx-jdbc-client.properties:
--------------------------------------------------------------------------------
1 | +java.base=7
2 | +io.vertx.vertx-sql-common=${project.version}
3 | +com.mchange.c3p0=0.9.5.2
4 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/descriptors/io.vertx.vertx-jwt.properties:
--------------------------------------------------------------------------------
1 | +java.base=7
2 | +io.vertx.vertx-auth-common=${project.version}
3 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/descriptors/io.vertx.vertx-sql-common.properties:
--------------------------------------------------------------------------------
1 | +java.base=7
2 | +java.jdbc=7
3 | +io.vertx.vertx-core=${project.version}
4 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/descriptors/io.vertx.vertx-web-templ-freemarker.properties:
--------------------------------------------------------------------------------
1 | +java.base=7
2 | +io.vertx.vertx-web=${project.version}
3 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/descriptors/io.vertx.vertx-web-templ-handlebars.properties:
--------------------------------------------------------------------------------
1 | +java.base=7
2 | +io.vertx.vertx-web=${project.version}
3 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/descriptors/io.vertx.vertx-web-templ-jade.properties:
--------------------------------------------------------------------------------
1 | +java.base=7
2 | +io.vertx.vertx-web=${project.version}
3 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/descriptors/io.vertx.vertx-web-templ-mvel.properties:
--------------------------------------------------------------------------------
1 | +java.base=7
2 | +io.vertx.vertx-web=${project.version}
3 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/descriptors/io.vertx.vertx-web-templ-pebble.properties:
--------------------------------------------------------------------------------
1 | +java.base=7
2 | +io.vertx.vertx-web=${project.version}
3 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/descriptors/io.vertx.vertx-web-templ-thymeleaf.properties:
--------------------------------------------------------------------------------
1 | +java.base=7
2 | +io.vertx.vertx-web=${project.version}
3 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/descriptors/io.vertx.vertx-web.properties:
--------------------------------------------------------------------------------
1 | +java.base=7
2 | +io.vertx.vertx-bridge-common=${project.version}
3 | +io.vertx.vertx-auth-common=${project.version}
4 | +io.vertx.vertx-auth-jwt=${project.version}
5 | +io.vertx.vertx-core=${project.version}
6 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/descriptors/org.apache.shiro.shiro-core.properties:
--------------------------------------------------------------------------------
1 | +commons-beanutils.commons-beanutils=1.8.3
2 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/src/main/ceylon/io/vertx/ceylon/auth/common/AuthOptions.ceylon:
--------------------------------------------------------------------------------
1 | import io.vertx.ext.auth {
2 | AuthOptions_=AuthOptions
3 | }
4 | import ceylon.json {
5 | JsonObject=Object,
6 | JsonArray=Array,
7 | parse
8 | }
9 | import io.vertx.lang.ceylon {
10 | BaseDataObject,
11 | Converter,
12 | ToJava
13 | }
14 | import ceylon.collection {
15 | HashMap
16 | }
17 | import io.vertx.core.json {
18 | JsonObject_=JsonObject,
19 | JsonArray_=JsonArray
20 | }
21 | /* Generated from io.vertx.ext.auth.AuthOptions */
22 | " A common base object for authentication options.\n"
23 | shared interface AuthOptions satisfies BaseDataObject {
24 | shared actual default JsonObject toJson() {
25 | value json = JsonObject();
26 | return json;
27 | }
28 | }
29 |
30 | shared object authOptions {
31 | }
32 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/src/main/ceylon/io/vertx/ceylon/auth/common/KeyStoreOptions.ceylon:
--------------------------------------------------------------------------------
1 | import io.vertx.ext.auth {
2 | KeyStoreOptions_=KeyStoreOptions
3 | }
4 | import ceylon.json {
5 | JsonObject=Object,
6 | JsonArray=Array,
7 | parse
8 | }
9 | import io.vertx.lang.ceylon {
10 | BaseDataObject,
11 | Converter,
12 | ToJava
13 | }
14 | import ceylon.collection {
15 | HashMap
16 | }
17 | import io.vertx.core.json {
18 | JsonObject_=JsonObject,
19 | JsonArray_=JsonArray
20 | }
21 | /* Generated from io.vertx.ext.auth.KeyStoreOptions */
22 | " Options describing how an JWT KeyStore should behave.\n"
23 | shared class KeyStoreOptions(
24 | shared String? password = null,
25 | shared String? path = null,
26 | shared String? type = null) satisfies BaseDataObject {
27 | shared actual default JsonObject toJson() {
28 | value json = JsonObject();
29 | if (exists password) {
30 | json.put("password", password);
31 | }
32 | if (exists path) {
33 | json.put("path", path);
34 | }
35 | if (exists type) {
36 | json.put("type", type);
37 | }
38 | return json;
39 | }
40 | }
41 |
42 | shared object keyStoreOptions {
43 |
44 | shared KeyStoreOptions fromJson(JsonObject json) {
45 | String? password = json.getStringOrNull("password");
46 | String? path = json.getStringOrNull("path");
47 | String? type = json.getStringOrNull("type");
48 | return KeyStoreOptions {
49 | password = password;
50 | path = path;
51 | type = type;
52 | };
53 | }
54 |
55 | shared object toJava extends Converter() {
56 | shared actual KeyStoreOptions_ convert(KeyStoreOptions src) {
57 | // Todo : make optimized version without json
58 | value json = JsonObject_(src.toJson().string);
59 | value ret = KeyStoreOptions_(json);
60 | return ret;
61 | }
62 | }
63 | shared JsonObject toJson(KeyStoreOptions obj) => obj.toJson();
64 | }
65 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/src/main/ceylon/io/vertx/ceylon/auth/common/PubSecKeyOptions.ceylon:
--------------------------------------------------------------------------------
1 | import io.vertx.ext.auth {
2 | PubSecKeyOptions_=PubSecKeyOptions
3 | }
4 | import ceylon.json {
5 | JsonObject=Object,
6 | JsonArray=Array,
7 | parse
8 | }
9 | import io.vertx.lang.ceylon {
10 | BaseDataObject,
11 | Converter,
12 | ToJava
13 | }
14 | import ceylon.collection {
15 | HashMap
16 | }
17 | import io.vertx.core.json {
18 | JsonObject_=JsonObject,
19 | JsonArray_=JsonArray
20 | }
21 | /* Generated from io.vertx.ext.auth.PubSecKeyOptions */
22 | " Options describing how a Cryptographic Key.\n"
23 | shared class PubSecKeyOptions(
24 | shared String? algorithm = null,
25 | shared Boolean? certificate = null,
26 | shared String? publicKey = null,
27 | shared String? secretKey = null,
28 | shared Boolean? symmetric = null) satisfies BaseDataObject {
29 | shared actual default JsonObject toJson() {
30 | value json = JsonObject();
31 | if (exists algorithm) {
32 | json.put("algorithm", algorithm);
33 | }
34 | if (exists certificate) {
35 | json.put("certificate", certificate);
36 | }
37 | if (exists publicKey) {
38 | json.put("publicKey", publicKey);
39 | }
40 | if (exists secretKey) {
41 | json.put("secretKey", secretKey);
42 | }
43 | if (exists symmetric) {
44 | json.put("symmetric", symmetric);
45 | }
46 | return json;
47 | }
48 | }
49 |
50 | shared object pubSecKeyOptions {
51 |
52 | shared PubSecKeyOptions fromJson(JsonObject json) {
53 | String? algorithm = json.getStringOrNull("algorithm");
54 | Boolean? certificate = json.getBooleanOrNull("certificate");
55 | String? publicKey = json.getStringOrNull("publicKey");
56 | String? secretKey = json.getStringOrNull("secretKey");
57 | Boolean? symmetric = json.getBooleanOrNull("symmetric");
58 | return PubSecKeyOptions {
59 | algorithm = algorithm;
60 | certificate = certificate;
61 | publicKey = publicKey;
62 | secretKey = secretKey;
63 | symmetric = symmetric;
64 | };
65 | }
66 |
67 | shared object toJava extends Converter() {
68 | shared actual PubSecKeyOptions_ convert(PubSecKeyOptions src) {
69 | // Todo : make optimized version without json
70 | value json = JsonObject_(src.toJson().string);
71 | value ret = PubSecKeyOptions_(json);
72 | return ret;
73 | }
74 | }
75 | shared JsonObject toJson(PubSecKeyOptions obj) => obj.toJson();
76 | }
77 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/src/main/ceylon/io/vertx/ceylon/auth/common/SecretOptions.ceylon:
--------------------------------------------------------------------------------
1 | import io.vertx.ext.auth {
2 | SecretOptions_=SecretOptions
3 | }
4 | import ceylon.json {
5 | JsonObject=Object,
6 | JsonArray=Array,
7 | parse
8 | }
9 | import io.vertx.lang.ceylon {
10 | BaseDataObject,
11 | Converter,
12 | ToJava
13 | }
14 | import ceylon.collection {
15 | HashMap
16 | }
17 | import io.vertx.core.json {
18 | JsonObject_=JsonObject,
19 | JsonArray_=JsonArray
20 | }
21 | /* Generated from io.vertx.ext.auth.SecretOptions */
22 | " Options describing a secret.\n"
23 | shared class SecretOptions(
24 | shared String? secret = null,
25 | shared String? type = null) satisfies BaseDataObject {
26 | shared actual default JsonObject toJson() {
27 | value json = JsonObject();
28 | if (exists secret) {
29 | json.put("secret", secret);
30 | }
31 | if (exists type) {
32 | json.put("type", type);
33 | }
34 | return json;
35 | }
36 | }
37 |
38 | shared object secretOptions {
39 |
40 | shared SecretOptions fromJson(JsonObject json) {
41 | String? secret = json.getStringOrNull("secret");
42 | String? type = json.getStringOrNull("type");
43 | return SecretOptions {
44 | secret = secret;
45 | type = type;
46 | };
47 | }
48 |
49 | shared object toJava extends Converter() {
50 | shared actual SecretOptions_ convert(SecretOptions src) {
51 | // Todo : make optimized version without json
52 | value json = JsonObject_(src.toJson().string);
53 | value ret = SecretOptions_(json);
54 | return ret;
55 | }
56 | }
57 | shared JsonObject toJson(SecretOptions obj) => obj.toJson();
58 | }
59 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/src/main/ceylon/io/vertx/ceylon/auth/common/chainAuth_.java:
--------------------------------------------------------------------------------
1 | package io.vertx.ceylon.auth.common;
2 |
3 | import com.redhat.ceylon.compiler.java.metadata.Ceylon;
4 | import com.redhat.ceylon.compiler.java.metadata.TypeInfo;
5 | import com.redhat.ceylon.compiler.java.metadata.TypeParameter;
6 | import com.redhat.ceylon.compiler.java.metadata.TypeParameters;
7 | import com.redhat.ceylon.compiler.java.metadata.Variance;
8 | import com.redhat.ceylon.compiler.java.metadata.Ignore;
9 | import com.redhat.ceylon.compiler.java.metadata.Name;
10 | import com.redhat.ceylon.compiler.java.runtime.model.TypeDescriptor;
11 | import com.redhat.ceylon.compiler.java.runtime.model.ReifiedType;
12 | import ceylon.language.Callable;
13 | import ceylon.language.DocAnnotation$annotation$;
14 | import io.vertx.core.json.JsonObject;
15 | import io.vertx.core.AsyncResult;
16 | import io.vertx.core.Handler;
17 |
18 | @Ceylon(major = 8)
19 | @Name("chainAuth")
20 | @com.redhat.ceylon.compiler.java.metadata.Object
21 | public class chainAuth_ implements ReifiedType {
22 |
23 | private static final chainAuth_ instance = new chainAuth_();
24 | public static final TypeDescriptor $TypeDescriptor$ = TypeDescriptor.klass(chainAuth_.class);
25 |
26 | @Ignore
27 | public TypeDescriptor $getType$() {
28 | return $TypeDescriptor$;
29 | }
30 |
31 | @Ignore
32 | @TypeInfo("io.vertx.ceylon.auth.common::chainAuth")
33 | public static chainAuth_ get_() {
34 | return instance;
35 | }
36 |
37 |
38 | @DocAnnotation$annotation$(description = " Create a Chainable Auth Provider auth provider\n")
39 | @TypeInfo("io.vertx.ceylon.auth.common::ChainAuth")
40 | public ChainAuth create() {
41 | ChainAuth ret = io.vertx.ceylon.auth.common.ChainAuth.TO_CEYLON.converter().safeConvert(io.vertx.ext.auth.ChainAuth.create());
42 | return ret;
43 | }
44 |
45 | }
46 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/src/main/ceylon/io/vertx/ceylon/auth/common/hashingStrategy_.java:
--------------------------------------------------------------------------------
1 | package io.vertx.ceylon.auth.common;
2 |
3 | import com.redhat.ceylon.compiler.java.metadata.Ceylon;
4 | import com.redhat.ceylon.compiler.java.metadata.TypeInfo;
5 | import com.redhat.ceylon.compiler.java.metadata.TypeParameter;
6 | import com.redhat.ceylon.compiler.java.metadata.TypeParameters;
7 | import com.redhat.ceylon.compiler.java.metadata.Variance;
8 | import com.redhat.ceylon.compiler.java.metadata.Ignore;
9 | import com.redhat.ceylon.compiler.java.metadata.Name;
10 | import com.redhat.ceylon.compiler.java.runtime.model.TypeDescriptor;
11 | import com.redhat.ceylon.compiler.java.runtime.model.ReifiedType;
12 | import ceylon.language.Callable;
13 | import ceylon.language.DocAnnotation$annotation$;
14 | import java.util.Map;
15 |
16 | @Ceylon(major = 8)
17 | @Name("hashingStrategy")
18 | @com.redhat.ceylon.compiler.java.metadata.Object
19 | public class hashingStrategy_ implements ReifiedType {
20 |
21 | private static final hashingStrategy_ instance = new hashingStrategy_();
22 | public static final TypeDescriptor $TypeDescriptor$ = TypeDescriptor.klass(hashingStrategy_.class);
23 |
24 | @Ignore
25 | public TypeDescriptor $getType$() {
26 | return $TypeDescriptor$;
27 | }
28 |
29 | @Ignore
30 | @TypeInfo("io.vertx.ceylon.auth.common::hashingStrategy")
31 | public static hashingStrategy_ get_() {
32 | return instance;
33 | }
34 |
35 |
36 | @DocAnnotation$annotation$(description = " Factory method to load the algorithms from the system\n")
37 | @TypeInfo("io.vertx.ceylon.auth.common::HashingStrategy")
38 | public HashingStrategy load() {
39 | HashingStrategy ret = io.vertx.ceylon.auth.common.HashingStrategy.TO_CEYLON.converter().safeConvert(io.vertx.ext.auth.HashingStrategy.load());
40 | return ret;
41 | }
42 |
43 | }
44 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/src/main/ceylon/io/vertx/ceylon/auth/common/module.ceylon:
--------------------------------------------------------------------------------
1 | native("jvm")
2 | module io.vertx.ceylon.auth.common "${project.version}" {
3 | native("jvm") import java.base "7";
4 | shared import ceylon.json "1.3.3";
5 | shared import io.vertx.ceylon.core "${project.version}";
6 | shared import "io.vertx.vertx-auth-common" "${project.version}";
7 | }
8 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/src/main/ceylon/io/vertx/ceylon/auth/common/package.ceylon:
--------------------------------------------------------------------------------
1 | shared package io.vertx.ceylon.auth.common;
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/src/main/ceylon/io/vertx/ceylon/auth/htdigest/module.ceylon:
--------------------------------------------------------------------------------
1 | native("jvm")
2 | module io.vertx.ceylon.auth.htdigest "${project.version}" {
3 | native("jvm") import java.base "7";
4 | shared import ceylon.json "1.3.3";
5 | shared import io.vertx.ceylon.auth.common "${project.version}";
6 | shared import "io.vertx.vertx-auth-htdigest" "${project.version}";
7 | }
8 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/src/main/ceylon/io/vertx/ceylon/auth/htdigest/package.ceylon:
--------------------------------------------------------------------------------
1 | shared package io.vertx.ceylon.auth.htdigest;
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/src/main/ceylon/io/vertx/ceylon/auth/jdbc/jdbcAuth_.java:
--------------------------------------------------------------------------------
1 | package io.vertx.ceylon.auth.jdbc;
2 |
3 | import com.redhat.ceylon.compiler.java.metadata.Ceylon;
4 | import com.redhat.ceylon.compiler.java.metadata.TypeInfo;
5 | import com.redhat.ceylon.compiler.java.metadata.TypeParameter;
6 | import com.redhat.ceylon.compiler.java.metadata.TypeParameters;
7 | import com.redhat.ceylon.compiler.java.metadata.Variance;
8 | import com.redhat.ceylon.compiler.java.metadata.Ignore;
9 | import com.redhat.ceylon.compiler.java.metadata.Name;
10 | import com.redhat.ceylon.compiler.java.runtime.model.TypeDescriptor;
11 | import com.redhat.ceylon.compiler.java.runtime.model.ReifiedType;
12 | import ceylon.language.Callable;
13 | import ceylon.language.DocAnnotation$annotation$;
14 | import io.vertx.core.json.JsonArray;
15 | import io.vertx.ceylon.auth.common.User;
16 | import io.vertx.ceylon.jdbc.JDBCClient;
17 | import io.vertx.ceylon.core.Vertx;
18 | import io.vertx.core.json.JsonObject;
19 | import io.vertx.core.AsyncResult;
20 | import io.vertx.core.Handler;
21 | import io.vertx.ceylon.auth.common.AuthProvider;
22 |
23 | @Ceylon(major = 8)
24 | @Name("jdbcAuth")
25 | @com.redhat.ceylon.compiler.java.metadata.Object
26 | public class jdbcAuth_ implements ReifiedType {
27 |
28 | private static final jdbcAuth_ instance = new jdbcAuth_();
29 | public static final TypeDescriptor $TypeDescriptor$ = TypeDescriptor.klass(jdbcAuth_.class);
30 |
31 | @Ignore
32 | public TypeDescriptor $getType$() {
33 | return $TypeDescriptor$;
34 | }
35 |
36 | @Ignore
37 | @TypeInfo("io.vertx.ceylon.auth.jdbc::jdbcAuth")
38 | public static jdbcAuth_ get_() {
39 | return instance;
40 | }
41 |
42 |
43 | @DocAnnotation$annotation$(description = " Create a JDBC auth provider implementation\n")
44 | @TypeInfo("io.vertx.ceylon.auth.jdbc::JDBCAuth")
45 | public JDBCAuth create(
46 | final @TypeInfo("io.vertx.ceylon.core::Vertx") @Name("vertx") Vertx vertx,
47 | final @TypeInfo("io.vertx.ceylon.jdbc::JDBCClient") @Name("client")@DocAnnotation$annotation$(description = "the JDBC client instance\n") JDBCClient client) {
48 | io.vertx.core.Vertx arg_0 = io.vertx.ceylon.core.Vertx.TO_JAVA.safeConvert(vertx);
49 | io.vertx.ext.jdbc.JDBCClient arg_1 = io.vertx.ceylon.jdbc.JDBCClient.TO_JAVA.safeConvert(client);
50 | JDBCAuth ret = io.vertx.ceylon.auth.jdbc.JDBCAuth.TO_CEYLON.converter().safeConvert(io.vertx.ext.auth.jdbc.JDBCAuth.create(arg_0, arg_1));
51 | return ret;
52 | }
53 |
54 | }
55 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/src/main/ceylon/io/vertx/ceylon/auth/jdbc/module.ceylon:
--------------------------------------------------------------------------------
1 | native("jvm")
2 | module io.vertx.ceylon.auth.jdbc "${project.version}" {
3 | native("jvm") import java.base "7";
4 | shared import ceylon.json "1.3.3";
5 | shared import io.vertx.ceylon.auth.common "${project.version}";
6 | shared import io.vertx.ceylon.jdbc "${project.version}";
7 | shared import "io.vertx.vertx-auth-jdbc" "${project.version}";
8 | }
9 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/src/main/ceylon/io/vertx/ceylon/auth/jdbc/package.ceylon:
--------------------------------------------------------------------------------
1 | shared package io.vertx.ceylon.auth.jdbc;
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/src/main/ceylon/io/vertx/ceylon/auth/jwt/JWTKeyStoreOptions.ceylon:
--------------------------------------------------------------------------------
1 | import ceylon.json {
2 | JsonObject=Object,
3 | JsonArray=Array,
4 | parse
5 | }
6 | import io.vertx.lang.ceylon {
7 | BaseDataObject,
8 | Converter,
9 | ToJava
10 | }
11 | import io.vertx.ext.auth.jwt {
12 | JWTKeyStoreOptions_=JWTKeyStoreOptions
13 | }
14 | import ceylon.collection {
15 | HashMap
16 | }
17 | import io.vertx.core.json {
18 | JsonObject_=JsonObject,
19 | JsonArray_=JsonArray
20 | }
21 | /* Generated from io.vertx.ext.auth.jwt.JWTKeyStoreOptions */
22 | " Options describing how an JWT KeyStore should behave.\n"
23 | shared class JWTKeyStoreOptions(
24 | shared String? password = null,
25 | shared String? path = null,
26 | shared String? type = null) satisfies BaseDataObject {
27 | shared actual default JsonObject toJson() {
28 | value json = JsonObject();
29 | if (exists password) {
30 | json.put("password", password);
31 | }
32 | if (exists path) {
33 | json.put("path", path);
34 | }
35 | if (exists type) {
36 | json.put("type", type);
37 | }
38 | return json;
39 | }
40 | }
41 |
42 | shared object jwtKeyStoreOptions {
43 |
44 | shared JWTKeyStoreOptions fromJson(JsonObject json) {
45 | String? password = json.getStringOrNull("password");
46 | String? path = json.getStringOrNull("path");
47 | String? type = json.getStringOrNull("type");
48 | return JWTKeyStoreOptions {
49 | password = password;
50 | path = path;
51 | type = type;
52 | };
53 | }
54 |
55 | shared object toJava extends Converter() {
56 | shared actual JWTKeyStoreOptions_ convert(JWTKeyStoreOptions src) {
57 | // Todo : make optimized version without json
58 | value json = JsonObject_(src.toJson().string);
59 | value ret = JWTKeyStoreOptions_(json);
60 | return ret;
61 | }
62 | }
63 | shared JsonObject toJson(JWTKeyStoreOptions obj) => obj.toJson();
64 | }
65 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/src/main/ceylon/io/vertx/ceylon/auth/jwt/jwtAuth_.java:
--------------------------------------------------------------------------------
1 | package io.vertx.ceylon.auth.jwt;
2 |
3 | import com.redhat.ceylon.compiler.java.metadata.Ceylon;
4 | import com.redhat.ceylon.compiler.java.metadata.TypeInfo;
5 | import com.redhat.ceylon.compiler.java.metadata.TypeParameter;
6 | import com.redhat.ceylon.compiler.java.metadata.TypeParameters;
7 | import com.redhat.ceylon.compiler.java.metadata.Variance;
8 | import com.redhat.ceylon.compiler.java.metadata.Ignore;
9 | import com.redhat.ceylon.compiler.java.metadata.Name;
10 | import com.redhat.ceylon.compiler.java.runtime.model.TypeDescriptor;
11 | import com.redhat.ceylon.compiler.java.runtime.model.ReifiedType;
12 | import ceylon.language.Callable;
13 | import ceylon.language.DocAnnotation$annotation$;
14 | import io.vertx.ceylon.auth.common.User;
15 | import io.vertx.ceylon.core.Vertx;
16 | import io.vertx.core.json.JsonObject;
17 | import io.vertx.core.AsyncResult;
18 | import io.vertx.core.Handler;
19 | import io.vertx.ceylon.auth.common.AuthProvider;
20 |
21 | @Ceylon(major = 8)
22 | @Name("jwtAuth")
23 | @com.redhat.ceylon.compiler.java.metadata.Object
24 | public class jwtAuth_ implements ReifiedType {
25 |
26 | private static final jwtAuth_ instance = new jwtAuth_();
27 | public static final TypeDescriptor $TypeDescriptor$ = TypeDescriptor.klass(jwtAuth_.class);
28 |
29 | @Ignore
30 | public TypeDescriptor $getType$() {
31 | return $TypeDescriptor$;
32 | }
33 |
34 | @Ignore
35 | @TypeInfo("io.vertx.ceylon.auth.jwt::jwtAuth")
36 | public static jwtAuth_ get_() {
37 | return instance;
38 | }
39 |
40 |
41 | @DocAnnotation$annotation$(description = " Create a JWT auth provider\n")
42 | @TypeInfo("io.vertx.ceylon.auth.jwt::JWTAuth")
43 | public JWTAuth create(
44 | final @TypeInfo("io.vertx.ceylon.core::Vertx") @Name("vertx")@DocAnnotation$annotation$(description = "the Vertx instance\n") Vertx vertx,
45 | final @TypeInfo("io.vertx.ceylon.auth.jwt::JWTAuthOptions") @Name("config")@DocAnnotation$annotation$(description = "the config\n") io.vertx.ceylon.auth.jwt.JWTAuthOptions config) {
46 | io.vertx.core.Vertx arg_0 = io.vertx.ceylon.core.Vertx.TO_JAVA.safeConvert(vertx);
47 | io.vertx.ext.auth.jwt.JWTAuthOptions arg_1 = config == null ? null : new io.vertx.ext.auth.jwt.JWTAuthOptions(io.vertx.lang.ceylon.ToJava.JsonObject.convert(config.toJson()));
48 | JWTAuth ret = io.vertx.ceylon.auth.jwt.JWTAuth.TO_CEYLON.converter().safeConvert(io.vertx.ext.auth.jwt.JWTAuth.create(arg_0, arg_1));
49 | return ret;
50 | }
51 |
52 | }
53 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/src/main/ceylon/io/vertx/ceylon/auth/jwt/module.ceylon:
--------------------------------------------------------------------------------
1 | native("jvm")
2 | module io.vertx.ceylon.auth.jwt "${project.version}" {
3 | native("jvm") import java.base "7";
4 | shared import ceylon.json "1.3.3";
5 | shared import io.vertx.ceylon.auth.common "${project.version}";
6 | shared import io.vertx.ceylon.jwt "${project.version}";
7 | shared import "io.vertx.vertx-auth-jwt" "${project.version}";
8 | }
9 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/src/main/ceylon/io/vertx/ceylon/auth/jwt/package.ceylon:
--------------------------------------------------------------------------------
1 | shared package io.vertx.ceylon.auth.jwt;
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/src/main/ceylon/io/vertx/ceylon/auth/oauth2/KeycloakHelper.java:
--------------------------------------------------------------------------------
1 | package io.vertx.ceylon.auth.oauth2;
2 |
3 | import com.redhat.ceylon.compiler.java.metadata.Ceylon;
4 | import com.redhat.ceylon.compiler.java.metadata.TypeInfo;
5 | import com.redhat.ceylon.compiler.java.metadata.TypeParameter;
6 | import com.redhat.ceylon.compiler.java.metadata.TypeParameters;
7 | import com.redhat.ceylon.compiler.java.metadata.Variance;
8 | import com.redhat.ceylon.compiler.java.metadata.Ignore;
9 | import com.redhat.ceylon.compiler.java.metadata.Name;
10 | import com.redhat.ceylon.compiler.java.runtime.model.TypeDescriptor;
11 | import com.redhat.ceylon.compiler.java.runtime.model.ReifiedType;
12 | import ceylon.language.Callable;
13 | import ceylon.language.DocAnnotation$annotation$;
14 | import java.util.Set;
15 | import io.vertx.core.json.JsonObject;
16 |
17 | @Ceylon(major = 8)
18 | @DocAnnotation$annotation$(description = " Helper class for processing Keycloak principal.\n")
19 | public class KeycloakHelper implements ReifiedType {
20 |
21 | @Ignore
22 | public static final io.vertx.lang.ceylon.ConverterFactory TO_CEYLON = new io.vertx.lang.ceylon.ConverterFactory() {
23 | public io.vertx.lang.ceylon.Converter converter(final TypeDescriptor... descriptors) {
24 | return new io.vertx.lang.ceylon.Converter() {
25 | public KeycloakHelper convert(io.vertx.ext.auth.oauth2.KeycloakHelper src) {
26 | return new KeycloakHelper(src);
27 | }
28 | };
29 | }
30 | };
31 |
32 | @Ignore
33 | public static final io.vertx.lang.ceylon.Converter TO_JAVA = new io.vertx.lang.ceylon.Converter() {
34 | public io.vertx.ext.auth.oauth2.KeycloakHelper convert(KeycloakHelper src) {
35 | return src.delegate;
36 | }
37 | };
38 |
39 | @Ignore public static final TypeDescriptor $TypeDescriptor$ = new io.vertx.lang.ceylon.VertxTypeDescriptor(TypeDescriptor.klass(KeycloakHelper.class), io.vertx.ext.auth.oauth2.KeycloakHelper.class, TO_JAVA, TO_CEYLON);
40 | @Ignore private final io.vertx.ext.auth.oauth2.KeycloakHelper delegate;
41 |
42 | public KeycloakHelper(io.vertx.ext.auth.oauth2.KeycloakHelper delegate) {
43 | this.delegate = delegate;
44 | }
45 |
46 | @Ignore
47 | public TypeDescriptor $getType$() {
48 | return $TypeDescriptor$;
49 | }
50 |
51 | @Ignore
52 | public Object getDelegate() {
53 | return delegate;
54 | }
55 |
56 | }
57 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/src/main/ceylon/io/vertx/ceylon/auth/oauth2/OAuth2FlowType.ceylon:
--------------------------------------------------------------------------------
1 | import io.vertx.lang.ceylon { Converter }
2 | import io.vertx.ext.auth.oauth2 { OAuth2FlowType_=OAuth2FlowType }
3 |
4 | " OAuth2 Flows\n"
5 | shared abstract class OAuth2FlowType(shared String name) of auth_code | client | password | auth_jwt {
6 | }
7 |
8 | shared object auth_code extends OAuth2FlowType("AUTH_CODE") {}
9 | shared object client extends OAuth2FlowType("CLIENT") {}
10 | shared object password extends OAuth2FlowType("PASSWORD") {}
11 | " RFC7523\n"
12 | shared object auth_jwt extends OAuth2FlowType("AUTH_JWT") {}
13 |
14 | shared object oAuth2FlowType {
15 |
16 | shared String toString(OAuth2FlowType val) {
17 | switch (val)
18 | case(auth_code) { return "AUTH_CODE"; }
19 | case(client) { return "CLIENT"; }
20 | case(password) { return "PASSWORD"; }
21 | case(auth_jwt) { return "AUTH_JWT"; }
22 | }
23 |
24 | shared OAuth2FlowType fromString(String val) {
25 | switch (val)
26 | case("AUTH_CODE") { return auth_code; }
27 | case("CLIENT") { return client; }
28 | case("PASSWORD") { return password; }
29 | case("AUTH_JWT") { return auth_jwt; }
30 | else {
31 | throw Exception("Invalid OAuth2FlowType value ``val``");
32 | }
33 | }
34 |
35 | shared object toJava extends Converter() {
36 | shared actual OAuth2FlowType_ convert(OAuth2FlowType src) {
37 | switch (src)
38 | case(auth_code) { return OAuth2FlowType_.\iAUTH_CODE; }
39 | case(client) { return OAuth2FlowType_.\iCLIENT; }
40 | case(password) { return OAuth2FlowType_.\iPASSWORD; }
41 | case(auth_jwt) { return OAuth2FlowType_.\iAUTH_JWT; }
42 | }
43 | }
44 |
45 | shared object toCeylon extends Converter() {
46 | shared actual OAuth2FlowType convert(OAuth2FlowType_ src) {
47 | if (src == OAuth2FlowType_.\iAUTH_CODE) {
48 | return auth_code;
49 | }
50 | if (src == OAuth2FlowType_.\iCLIENT) {
51 | return client;
52 | }
53 | if (src == OAuth2FlowType_.\iPASSWORD) {
54 | return password;
55 | }
56 | if (src == OAuth2FlowType_.\iAUTH_JWT) {
57 | return auth_jwt;
58 | }
59 | throw Exception("Invalid enum value");
60 | }
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/src/main/ceylon/io/vertx/ceylon/auth/oauth2/module.ceylon:
--------------------------------------------------------------------------------
1 | native("jvm")
2 | module io.vertx.ceylon.auth.oauth2 "${project.version}" {
3 | native("jvm") import java.base "7";
4 | shared import ceylon.json "1.3.3";
5 | shared import io.vertx.ceylon.auth.common "${project.version}";
6 | shared import io.vertx.ceylon.jwt "${project.version}";
7 | shared import "io.vertx.vertx-auth-oauth2" "${project.version}";
8 | }
9 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/src/main/ceylon/io/vertx/ceylon/auth/oauth2/package.ceylon:
--------------------------------------------------------------------------------
1 | shared package io.vertx.ceylon.auth.oauth2;
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/src/main/ceylon/io/vertx/ceylon/auth/oauth2/providers/BoxAuth.java:
--------------------------------------------------------------------------------
1 | package io.vertx.ceylon.auth.oauth2.providers;
2 |
3 | import com.redhat.ceylon.compiler.java.metadata.Ceylon;
4 | import com.redhat.ceylon.compiler.java.metadata.TypeInfo;
5 | import com.redhat.ceylon.compiler.java.metadata.TypeParameter;
6 | import com.redhat.ceylon.compiler.java.metadata.TypeParameters;
7 | import com.redhat.ceylon.compiler.java.metadata.Variance;
8 | import com.redhat.ceylon.compiler.java.metadata.Ignore;
9 | import com.redhat.ceylon.compiler.java.metadata.Name;
10 | import com.redhat.ceylon.compiler.java.runtime.model.TypeDescriptor;
11 | import com.redhat.ceylon.compiler.java.runtime.model.ReifiedType;
12 | import ceylon.language.Callable;
13 | import ceylon.language.DocAnnotation$annotation$;
14 | import io.vertx.ceylon.core.Vertx;
15 | import io.vertx.ceylon.auth.oauth2.OAuth2Auth;
16 |
17 | @Ceylon(major = 8)
18 | @DocAnnotation$annotation$(description = " Simplified factory to create an for box.com.\n")
19 | public class BoxAuth implements ReifiedType {
20 |
21 | @Ignore
22 | public static final io.vertx.lang.ceylon.ConverterFactory TO_CEYLON = new io.vertx.lang.ceylon.ConverterFactory() {
23 | public io.vertx.lang.ceylon.Converter converter(final TypeDescriptor... descriptors) {
24 | return new io.vertx.lang.ceylon.Converter() {
25 | public BoxAuth convert(io.vertx.ext.auth.oauth2.providers.BoxAuth src) {
26 | return new BoxAuth(src);
27 | }
28 | };
29 | }
30 | };
31 |
32 | @Ignore
33 | public static final io.vertx.lang.ceylon.Converter TO_JAVA = new io.vertx.lang.ceylon.Converter() {
34 | public io.vertx.ext.auth.oauth2.providers.BoxAuth convert(BoxAuth src) {
35 | return src.delegate;
36 | }
37 | };
38 |
39 | @Ignore public static final TypeDescriptor $TypeDescriptor$ = new io.vertx.lang.ceylon.VertxTypeDescriptor(TypeDescriptor.klass(BoxAuth.class), io.vertx.ext.auth.oauth2.providers.BoxAuth.class, TO_JAVA, TO_CEYLON);
40 | @Ignore private final io.vertx.ext.auth.oauth2.providers.BoxAuth delegate;
41 |
42 | public BoxAuth(io.vertx.ext.auth.oauth2.providers.BoxAuth delegate) {
43 | this.delegate = delegate;
44 | }
45 |
46 | @Ignore
47 | public TypeDescriptor $getType$() {
48 | return $TypeDescriptor$;
49 | }
50 |
51 | @Ignore
52 | public Object getDelegate() {
53 | return delegate;
54 | }
55 |
56 | }
57 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/src/main/ceylon/io/vertx/ceylon/auth/oauth2/providers/LiveAuth.java:
--------------------------------------------------------------------------------
1 | package io.vertx.ceylon.auth.oauth2.providers;
2 |
3 | import com.redhat.ceylon.compiler.java.metadata.Ceylon;
4 | import com.redhat.ceylon.compiler.java.metadata.TypeInfo;
5 | import com.redhat.ceylon.compiler.java.metadata.TypeParameter;
6 | import com.redhat.ceylon.compiler.java.metadata.TypeParameters;
7 | import com.redhat.ceylon.compiler.java.metadata.Variance;
8 | import com.redhat.ceylon.compiler.java.metadata.Ignore;
9 | import com.redhat.ceylon.compiler.java.metadata.Name;
10 | import com.redhat.ceylon.compiler.java.runtime.model.TypeDescriptor;
11 | import com.redhat.ceylon.compiler.java.runtime.model.ReifiedType;
12 | import ceylon.language.Callable;
13 | import ceylon.language.DocAnnotation$annotation$;
14 | import io.vertx.ceylon.core.Vertx;
15 | import io.vertx.ceylon.auth.oauth2.OAuth2Auth;
16 |
17 | @Ceylon(major = 8)
18 | @DocAnnotation$annotation$(description = " Simplified factory to create an for live.com Services.\n")
19 | public class LiveAuth implements ReifiedType {
20 |
21 | @Ignore
22 | public static final io.vertx.lang.ceylon.ConverterFactory TO_CEYLON = new io.vertx.lang.ceylon.ConverterFactory() {
23 | public io.vertx.lang.ceylon.Converter converter(final TypeDescriptor... descriptors) {
24 | return new io.vertx.lang.ceylon.Converter() {
25 | public LiveAuth convert(io.vertx.ext.auth.oauth2.providers.LiveAuth src) {
26 | return new LiveAuth(src);
27 | }
28 | };
29 | }
30 | };
31 |
32 | @Ignore
33 | public static final io.vertx.lang.ceylon.Converter TO_JAVA = new io.vertx.lang.ceylon.Converter() {
34 | public io.vertx.ext.auth.oauth2.providers.LiveAuth convert(LiveAuth src) {
35 | return src.delegate;
36 | }
37 | };
38 |
39 | @Ignore public static final TypeDescriptor $TypeDescriptor$ = new io.vertx.lang.ceylon.VertxTypeDescriptor(TypeDescriptor.klass(LiveAuth.class), io.vertx.ext.auth.oauth2.providers.LiveAuth.class, TO_JAVA, TO_CEYLON);
40 | @Ignore private final io.vertx.ext.auth.oauth2.providers.LiveAuth delegate;
41 |
42 | public LiveAuth(io.vertx.ext.auth.oauth2.providers.LiveAuth delegate) {
43 | this.delegate = delegate;
44 | }
45 |
46 | @Ignore
47 | public TypeDescriptor $getType$() {
48 | return $TypeDescriptor$;
49 | }
50 |
51 | @Ignore
52 | public Object getDelegate() {
53 | return delegate;
54 | }
55 |
56 | }
57 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/src/main/ceylon/io/vertx/ceylon/auth/oauth2/providers/package.ceylon:
--------------------------------------------------------------------------------
1 | shared package io.vertx.ceylon.auth.oauth2.providers;
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/src/main/ceylon/io/vertx/ceylon/auth/shiro/ShiroAuthOptions.ceylon:
--------------------------------------------------------------------------------
1 | import io.vertx.ceylon.auth.shiro {
2 | ShiroAuthRealmType,
3 | shiroAuthRealmType_=shiroAuthRealmType
4 | }
5 | import ceylon.json {
6 | JsonObject=Object,
7 | JsonArray=Array,
8 | parse
9 | }
10 | import io.vertx.lang.ceylon {
11 | BaseDataObject,
12 | Converter,
13 | ToJava
14 | }
15 | import io.vertx.ext.auth.shiro {
16 | ShiroAuthOptions_=ShiroAuthOptions
17 | }
18 | import io.vertx.ceylon.auth.common {
19 | AuthOptions
20 | }
21 | import ceylon.collection {
22 | HashMap
23 | }
24 | import io.vertx.core.json {
25 | JsonObject_=JsonObject,
26 | JsonArray_=JsonArray
27 | }
28 | /* Generated from io.vertx.ext.auth.shiro.ShiroAuthOptions */
29 | " Shiro auth configuration options, see Vert.x Auth Shiro component and/or Apache Shiro project.\n"
30 | shared class ShiroAuthOptions(
31 | " Set the Shiro auth config.\n"
32 | shared JsonObject? config = null,
33 | " Set the Shiro auth options type.\n"
34 | shared ShiroAuthRealmType? type = null) satisfies
35 | AuthOptions & BaseDataObject {
36 | shared actual default JsonObject toJson() {
37 | value json = JsonObject();
38 | if (exists config) {
39 | json.put("config", config);
40 | }
41 | if (exists type) {
42 | json.put("type", shiroAuthRealmType_.toString(type));
43 | }
44 | return json;
45 | }
46 | }
47 |
48 | shared object shiroAuthOptions {
49 |
50 | shared ShiroAuthOptions fromJson(JsonObject json) {
51 | JsonObject? config = json.getObjectOrNull("config");
52 | ShiroAuthRealmType? type = if (exists tmp = json.getStringOrNull("type")) then shiroAuthRealmType_.fromString(tmp) else null;
53 | return ShiroAuthOptions {
54 | config = config;
55 | type = type;
56 | };
57 | }
58 |
59 | shared object toJava extends Converter() {
60 | shared actual ShiroAuthOptions_ convert(ShiroAuthOptions src) {
61 | // Todo : make optimized version without json
62 | value json = JsonObject_(src.toJson().string);
63 | value ret = ShiroAuthOptions_(json);
64 | return ret;
65 | }
66 | }
67 | shared JsonObject toJson(ShiroAuthOptions obj) => obj.toJson();
68 | }
69 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/src/main/ceylon/io/vertx/ceylon/auth/shiro/ShiroAuthRealmType.ceylon:
--------------------------------------------------------------------------------
1 | import io.vertx.lang.ceylon { Converter }
2 | import io.vertx.ext.auth.shiro { ShiroAuthRealmType_=ShiroAuthRealmType }
3 |
4 | " The type of the Shiro auth realm\n"
5 | shared abstract class ShiroAuthRealmType(shared String name) of properties | ldap {
6 | }
7 |
8 | " The realm is a Shiro properties auth provider\n"
9 | shared object properties extends ShiroAuthRealmType("PROPERTIES") {}
10 | " The realm is a Shiro LDAP auth provider\n"
11 | shared object ldap extends ShiroAuthRealmType("LDAP") {}
12 |
13 | shared object shiroAuthRealmType {
14 |
15 | shared String toString(ShiroAuthRealmType val) {
16 | switch (val)
17 | case(properties) { return "PROPERTIES"; }
18 | case(ldap) { return "LDAP"; }
19 | }
20 |
21 | shared ShiroAuthRealmType fromString(String val) {
22 | switch (val)
23 | case("PROPERTIES") { return properties; }
24 | case("LDAP") { return ldap; }
25 | else {
26 | throw Exception("Invalid ShiroAuthRealmType value ``val``");
27 | }
28 | }
29 |
30 | shared object toJava extends Converter() {
31 | shared actual ShiroAuthRealmType_ convert(ShiroAuthRealmType src) {
32 | switch (src)
33 | case(properties) { return ShiroAuthRealmType_.\iPROPERTIES; }
34 | case(ldap) { return ShiroAuthRealmType_.\iLDAP; }
35 | }
36 | }
37 |
38 | shared object toCeylon extends Converter() {
39 | shared actual ShiroAuthRealmType convert(ShiroAuthRealmType_ src) {
40 | if (src == ShiroAuthRealmType_.\iPROPERTIES) {
41 | return properties;
42 | }
43 | if (src == ShiroAuthRealmType_.\iLDAP) {
44 | return ldap;
45 | }
46 | throw Exception("Invalid enum value");
47 | }
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/src/main/ceylon/io/vertx/ceylon/auth/shiro/module.ceylon:
--------------------------------------------------------------------------------
1 | native("jvm")
2 | module io.vertx.ceylon.auth.shiro "${project.version}" {
3 | native("jvm") import java.base "7";
4 | shared import ceylon.json "1.3.3";
5 | shared import io.vertx.ceylon.auth.common "${project.version}";
6 | shared import "io.vertx.vertx-auth-shiro" "${project.version}";
7 | }
8 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/src/main/ceylon/io/vertx/ceylon/auth/shiro/package.ceylon:
--------------------------------------------------------------------------------
1 | shared package io.vertx.ceylon.auth.shiro;
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/src/main/ceylon/io/vertx/ceylon/bridge/common/BridgeOptions.ceylon:
--------------------------------------------------------------------------------
1 | import io.vertx.ceylon.bridge.common {
2 | PermittedOptions,
3 | permittedOptions_=permittedOptions
4 | }
5 | import ceylon.json {
6 | JsonObject=Object,
7 | JsonArray=Array,
8 | parse
9 | }
10 | import io.vertx.lang.ceylon {
11 | BaseDataObject,
12 | Converter,
13 | ToJava
14 | }
15 | import io.vertx.ext.bridge {
16 | BridgeOptions_=BridgeOptions
17 | }
18 | import ceylon.collection {
19 | HashMap
20 | }
21 | import io.vertx.core.json {
22 | JsonObject_=JsonObject,
23 | JsonArray_=JsonArray
24 | }
25 | /* Generated from io.vertx.ext.bridge.BridgeOptions */
26 | " Specify the event bus bridge options.\n"
27 | shared class BridgeOptions(
28 | " Sets the list of inbound permitted options.\n"
29 | shared {PermittedOptions*}? inboundPermitteds = null,
30 | " Sets the list of outbound permitted options.\n"
31 | shared {PermittedOptions*}? outboundPermitteds = null) satisfies BaseDataObject {
32 | shared actual default JsonObject toJson() {
33 | value json = JsonObject();
34 | if (exists inboundPermitteds) {
35 | json.put("inboundPermitteds", JsonArray(inboundPermitteds.map(permittedOptions_.toJson)));
36 | }
37 | if (exists outboundPermitteds) {
38 | json.put("outboundPermitteds", JsonArray(outboundPermitteds.map(permittedOptions_.toJson)));
39 | }
40 | return json;
41 | }
42 | }
43 |
44 | shared object bridgeOptions {
45 |
46 | shared BridgeOptions fromJson(JsonObject json) {
47 | {PermittedOptions*}? inboundPermitteds = json.getArrayOrNull("inboundPermitteds")?.objects?.map(permittedOptions_.fromJson);
48 | {PermittedOptions*}? outboundPermitteds = json.getArrayOrNull("outboundPermitteds")?.objects?.map(permittedOptions_.fromJson);
49 | return BridgeOptions {
50 | inboundPermitteds = inboundPermitteds;
51 | outboundPermitteds = outboundPermitteds;
52 | };
53 | }
54 |
55 | shared object toCeylon extends Converter() {
56 | shared actual BridgeOptions convert(BridgeOptions_ src) {
57 | value json = parse(src.toJson().string);
58 | assert(is JsonObject json);
59 | return fromJson(json);
60 | }
61 | }
62 |
63 | shared object toJava extends Converter() {
64 | shared actual BridgeOptions_ convert(BridgeOptions src) {
65 | // Todo : make optimized version without json
66 | value json = JsonObject_(src.toJson().string);
67 | value ret = BridgeOptions_(json);
68 | return ret;
69 | }
70 | }
71 | shared JsonObject toJson(BridgeOptions obj) => obj.toJson();
72 | }
73 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/src/main/ceylon/io/vertx/ceylon/bridge/common/module.ceylon:
--------------------------------------------------------------------------------
1 | native("jvm")
2 | module io.vertx.ceylon.bridge.common "${project.version}" {
3 | native("jvm") import java.base "7";
4 | shared import ceylon.json "1.3.3";
5 | shared import io.vertx.ceylon.core "${project.version}";
6 | shared import "io.vertx.vertx-bridge-common" "${project.version}";
7 | }
8 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/src/main/ceylon/io/vertx/ceylon/bridge/common/package.ceylon:
--------------------------------------------------------------------------------
1 | shared package io.vertx.ceylon.bridge.common;
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/src/main/ceylon/io/vertx/ceylon/jdbc/module.ceylon:
--------------------------------------------------------------------------------
1 | native("jvm")
2 | module io.vertx.ceylon.jdbc "${project.version}" {
3 | native("jvm") import java.base "7";
4 | shared import ceylon.json "1.3.3";
5 | shared import io.vertx.ceylon.sql "${project.version}";
6 | shared import "io.vertx.vertx-jdbc-client" "${project.version}";
7 | }
8 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/src/main/ceylon/io/vertx/ceylon/jdbc/package.ceylon:
--------------------------------------------------------------------------------
1 | shared package io.vertx.ceylon.jdbc;
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/src/main/ceylon/io/vertx/ceylon/jwt/module.ceylon:
--------------------------------------------------------------------------------
1 | native("jvm")
2 | module io.vertx.ceylon.jwt "${project.version}" {
3 | native("jvm") import java.base "7";
4 | shared import ceylon.json "1.3.3";
5 | shared import io.vertx.ceylon.auth.common "${project.version}";
6 | shared import "io.vertx.vertx-jwt" "${project.version}";
7 | }
8 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/src/main/ceylon/io/vertx/ceylon/jwt/package.ceylon:
--------------------------------------------------------------------------------
1 | shared package io.vertx.ceylon.jwt;
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/src/main/ceylon/io/vertx/ceylon/sql/FetchDirection.ceylon:
--------------------------------------------------------------------------------
1 | import io.vertx.lang.ceylon { Converter }
2 | import io.vertx.ext.sql { FetchDirection_=FetchDirection }
3 |
4 | " Represents the fetch direction hint\n"
5 | shared abstract class FetchDirection(shared String name) of forward | reverse | unknown {
6 | }
7 |
8 | shared object forward extends FetchDirection("FORWARD") {}
9 | shared object reverse extends FetchDirection("REVERSE") {}
10 | shared object unknown extends FetchDirection("UNKNOWN") {}
11 |
12 | shared object fetchDirection {
13 |
14 | shared String toString(FetchDirection val) {
15 | switch (val)
16 | case(forward) { return "FORWARD"; }
17 | case(reverse) { return "REVERSE"; }
18 | case(unknown) { return "UNKNOWN"; }
19 | }
20 |
21 | shared FetchDirection fromString(String val) {
22 | switch (val)
23 | case("FORWARD") { return forward; }
24 | case("REVERSE") { return reverse; }
25 | case("UNKNOWN") { return unknown; }
26 | else {
27 | throw Exception("Invalid FetchDirection value ``val``");
28 | }
29 | }
30 |
31 | shared object toJava extends Converter() {
32 | shared actual FetchDirection_ convert(FetchDirection src) {
33 | switch (src)
34 | case(forward) { return FetchDirection_.\iFORWARD; }
35 | case(reverse) { return FetchDirection_.\iREVERSE; }
36 | case(unknown) { return FetchDirection_.\iUNKNOWN; }
37 | }
38 | }
39 |
40 | shared object toCeylon extends Converter() {
41 | shared actual FetchDirection convert(FetchDirection_ src) {
42 | if (src == FetchDirection_.\iFORWARD) {
43 | return forward;
44 | }
45 | if (src == FetchDirection_.\iREVERSE) {
46 | return reverse;
47 | }
48 | if (src == FetchDirection_.\iUNKNOWN) {
49 | return unknown;
50 | }
51 | throw Exception("Invalid enum value");
52 | }
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/src/main/ceylon/io/vertx/ceylon/sql/ResultSetConcurrency.ceylon:
--------------------------------------------------------------------------------
1 | import io.vertx.lang.ceylon { Converter }
2 | import io.vertx.ext.sql { ResultSetConcurrency_=ResultSetConcurrency }
3 |
4 | " Represents the resultset concurrency hint\n"
5 | shared abstract class ResultSetConcurrency(shared String name) of read_only | updatable {
6 | }
7 |
8 | shared object read_only extends ResultSetConcurrency("READ_ONLY") {}
9 | shared object updatable extends ResultSetConcurrency("UPDATABLE") {}
10 |
11 | shared object resultSetConcurrency {
12 |
13 | shared String toString(ResultSetConcurrency val) {
14 | switch (val)
15 | case(read_only) { return "READ_ONLY"; }
16 | case(updatable) { return "UPDATABLE"; }
17 | }
18 |
19 | shared ResultSetConcurrency fromString(String val) {
20 | switch (val)
21 | case("READ_ONLY") { return read_only; }
22 | case("UPDATABLE") { return updatable; }
23 | else {
24 | throw Exception("Invalid ResultSetConcurrency value ``val``");
25 | }
26 | }
27 |
28 | shared object toJava extends Converter() {
29 | shared actual ResultSetConcurrency_ convert(ResultSetConcurrency src) {
30 | switch (src)
31 | case(read_only) { return ResultSetConcurrency_.\iREAD_ONLY; }
32 | case(updatable) { return ResultSetConcurrency_.\iUPDATABLE; }
33 | }
34 | }
35 |
36 | shared object toCeylon extends Converter() {
37 | shared actual ResultSetConcurrency convert(ResultSetConcurrency_ src) {
38 | if (src == ResultSetConcurrency_.\iREAD_ONLY) {
39 | return read_only;
40 | }
41 | if (src == ResultSetConcurrency_.\iUPDATABLE) {
42 | return updatable;
43 | }
44 | throw Exception("Invalid enum value");
45 | }
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/src/main/ceylon/io/vertx/ceylon/sql/ResultSetType.ceylon:
--------------------------------------------------------------------------------
1 | import io.vertx.lang.ceylon { Converter }
2 | import io.vertx.ext.sql { ResultSetType_=ResultSetType }
3 |
4 | " Represents the resultset type hint\n"
5 | shared abstract class ResultSetType(shared String name) of forward_only | scroll_insensitive | scroll_sensitive {
6 | }
7 |
8 | shared object forward_only extends ResultSetType("FORWARD_ONLY") {}
9 | shared object scroll_insensitive extends ResultSetType("SCROLL_INSENSITIVE") {}
10 | shared object scroll_sensitive extends ResultSetType("SCROLL_SENSITIVE") {}
11 |
12 | shared object resultSetType {
13 |
14 | shared String toString(ResultSetType val) {
15 | switch (val)
16 | case(forward_only) { return "FORWARD_ONLY"; }
17 | case(scroll_insensitive) { return "SCROLL_INSENSITIVE"; }
18 | case(scroll_sensitive) { return "SCROLL_SENSITIVE"; }
19 | }
20 |
21 | shared ResultSetType fromString(String val) {
22 | switch (val)
23 | case("FORWARD_ONLY") { return forward_only; }
24 | case("SCROLL_INSENSITIVE") { return scroll_insensitive; }
25 | case("SCROLL_SENSITIVE") { return scroll_sensitive; }
26 | else {
27 | throw Exception("Invalid ResultSetType value ``val``");
28 | }
29 | }
30 |
31 | shared object toJava extends Converter() {
32 | shared actual ResultSetType_ convert(ResultSetType src) {
33 | switch (src)
34 | case(forward_only) { return ResultSetType_.\iFORWARD_ONLY; }
35 | case(scroll_insensitive) { return ResultSetType_.\iSCROLL_INSENSITIVE; }
36 | case(scroll_sensitive) { return ResultSetType_.\iSCROLL_SENSITIVE; }
37 | }
38 | }
39 |
40 | shared object toCeylon extends Converter() {
41 | shared actual ResultSetType convert(ResultSetType_ src) {
42 | if (src == ResultSetType_.\iFORWARD_ONLY) {
43 | return forward_only;
44 | }
45 | if (src == ResultSetType_.\iSCROLL_INSENSITIVE) {
46 | return scroll_insensitive;
47 | }
48 | if (src == ResultSetType_.\iSCROLL_SENSITIVE) {
49 | return scroll_sensitive;
50 | }
51 | throw Exception("Invalid enum value");
52 | }
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/src/main/ceylon/io/vertx/ceylon/sql/UpdateResult.ceylon:
--------------------------------------------------------------------------------
1 | import ceylon.json {
2 | JsonObject=Object,
3 | JsonArray=Array,
4 | parse
5 | }
6 | import io.vertx.lang.ceylon {
7 | BaseDataObject,
8 | Converter,
9 | ToJava
10 | }
11 | import io.vertx.ext.sql {
12 | UpdateResult_=UpdateResult
13 | }
14 | import ceylon.collection {
15 | HashMap
16 | }
17 | import io.vertx.core.json {
18 | JsonObject_=JsonObject,
19 | JsonArray_=JsonArray
20 | }
21 | /* Generated from io.vertx.ext.sql.UpdateResult */
22 | " Represents the result of an update/insert/delete operation on the database.\n \n The number of rows updated is available with [getUpdated](UpdateResult.type.html#getUpdated) and any generated\n keys are available with [getKeys](UpdateResult.type.html#getKeys).\n"
23 | shared class UpdateResult(
24 | " Get any generated keys\n"
25 | shared JsonArray? keys = null,
26 | " Get the number of rows updated\n"
27 | shared Integer? updated = null) satisfies BaseDataObject {
28 | shared actual default JsonObject toJson() {
29 | value json = JsonObject();
30 | if (exists keys) {
31 | json.put("keys", keys);
32 | }
33 | if (exists updated) {
34 | json.put("updated", updated);
35 | }
36 | return json;
37 | }
38 | }
39 |
40 | shared object updateResult {
41 |
42 | shared UpdateResult fromJson(JsonObject json) {
43 | JsonArray? keys = json.getArrayOrNull("keys");
44 | Integer? updated = json.getIntegerOrNull("updated");
45 | return UpdateResult {
46 | keys = keys;
47 | updated = updated;
48 | };
49 | }
50 |
51 | shared object toCeylon extends Converter() {
52 | shared actual UpdateResult convert(UpdateResult_ src) {
53 | value json = parse(src.toJson().string);
54 | assert(is JsonObject json);
55 | return fromJson(json);
56 | }
57 | }
58 |
59 | shared object toJava extends Converter() {
60 | shared actual UpdateResult_ convert(UpdateResult src) {
61 | // Todo : make optimized version without json
62 | value json = JsonObject_(src.toJson().string);
63 | value ret = UpdateResult_(json);
64 | return ret;
65 | }
66 | }
67 | shared JsonObject toJson(UpdateResult obj) => obj.toJson();
68 | }
69 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/src/main/ceylon/io/vertx/ceylon/sql/module.ceylon:
--------------------------------------------------------------------------------
1 | native("jvm")
2 | module io.vertx.ceylon.sql "${project.version}" {
3 | native("jvm") import java.base "7";
4 | shared import ceylon.json "1.3.3";
5 | shared import io.vertx.ceylon.core "${project.version}";
6 | shared import "io.vertx.vertx-sql-common" "${project.version}";
7 | }
8 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/src/main/ceylon/io/vertx/ceylon/sql/package.ceylon:
--------------------------------------------------------------------------------
1 | shared package io.vertx.ceylon.sql;
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/src/main/ceylon/io/vertx/ceylon/web/Http2PushMapping.ceylon:
--------------------------------------------------------------------------------
1 | import io.vertx.ext.web {
2 | Http2PushMapping_=Http2PushMapping
3 | }
4 | import ceylon.json {
5 | JsonObject=Object,
6 | JsonArray=Array,
7 | parse
8 | }
9 | import io.vertx.lang.ceylon {
10 | BaseDataObject,
11 | Converter,
12 | ToJava
13 | }
14 | import ceylon.collection {
15 | HashMap
16 | }
17 | import io.vertx.core.json {
18 | JsonObject_=JsonObject,
19 | JsonArray_=JsonArray
20 | }
21 | /* Generated from io.vertx.ext.web.Http2PushMapping */
22 | shared class Http2PushMapping(
23 | shared String? extensionTarget = null,
24 | shared String? filePath = null,
25 | shared Boolean? noPush = null) satisfies BaseDataObject {
26 | shared actual default JsonObject toJson() {
27 | value json = JsonObject();
28 | if (exists extensionTarget) {
29 | json.put("extensionTarget", extensionTarget);
30 | }
31 | if (exists filePath) {
32 | json.put("filePath", filePath);
33 | }
34 | if (exists noPush) {
35 | json.put("noPush", noPush);
36 | }
37 | return json;
38 | }
39 | }
40 |
41 | shared object http2PushMapping {
42 |
43 | shared Http2PushMapping fromJson(JsonObject json) {
44 | String? extensionTarget = json.getStringOrNull("extensionTarget");
45 | String? filePath = json.getStringOrNull("filePath");
46 | Boolean? noPush = json.getBooleanOrNull("noPush");
47 | return Http2PushMapping {
48 | extensionTarget = extensionTarget;
49 | filePath = filePath;
50 | noPush = noPush;
51 | };
52 | }
53 |
54 | shared object toJava extends Converter() {
55 | shared actual Http2PushMapping_ convert(Http2PushMapping src) {
56 | // Todo : make optimized version without json
57 | value json = JsonObject_(src.toJson().string);
58 | value ret = Http2PushMapping_(json);
59 | return ret;
60 | }
61 | }
62 | shared JsonObject toJson(Http2PushMapping obj) => obj.toJson();
63 | }
64 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/src/main/ceylon/io/vertx/ceylon/web/cookie_.java:
--------------------------------------------------------------------------------
1 | package io.vertx.ceylon.web;
2 |
3 | import com.redhat.ceylon.compiler.java.metadata.Ceylon;
4 | import com.redhat.ceylon.compiler.java.metadata.TypeInfo;
5 | import com.redhat.ceylon.compiler.java.metadata.TypeParameter;
6 | import com.redhat.ceylon.compiler.java.metadata.TypeParameters;
7 | import com.redhat.ceylon.compiler.java.metadata.Variance;
8 | import com.redhat.ceylon.compiler.java.metadata.Ignore;
9 | import com.redhat.ceylon.compiler.java.metadata.Name;
10 | import com.redhat.ceylon.compiler.java.runtime.model.TypeDescriptor;
11 | import com.redhat.ceylon.compiler.java.runtime.model.ReifiedType;
12 | import ceylon.language.Callable;
13 | import ceylon.language.DocAnnotation$annotation$;
14 |
15 | @Ceylon(major = 8)
16 | @Name("cookie")
17 | @com.redhat.ceylon.compiler.java.metadata.Object
18 | public class cookie_ implements ReifiedType {
19 |
20 | private static final cookie_ instance = new cookie_();
21 | public static final TypeDescriptor $TypeDescriptor$ = TypeDescriptor.klass(cookie_.class);
22 |
23 | @Ignore
24 | public TypeDescriptor $getType$() {
25 | return $TypeDescriptor$;
26 | }
27 |
28 | @Ignore
29 | @TypeInfo("io.vertx.ceylon.web::cookie")
30 | public static cookie_ get_() {
31 | return instance;
32 | }
33 |
34 |
35 | @DocAnnotation$annotation$(description = " Create a new cookie\n")
36 | @TypeInfo("io.vertx.ceylon.web::Cookie")
37 | public Cookie cookie(
38 | final @TypeInfo("ceylon.language::String") @Name("name")@DocAnnotation$annotation$(description = "the name of the cookie\n") ceylon.language.String name,
39 | final @TypeInfo("ceylon.language::String") @Name("value")@DocAnnotation$annotation$(description = "the cookie value\n") ceylon.language.String value) {
40 | java.lang.String arg_0 = io.vertx.lang.ceylon.ToJava.String.safeConvert(name);
41 | java.lang.String arg_1 = io.vertx.lang.ceylon.ToJava.String.safeConvert(value);
42 | Cookie ret = io.vertx.ceylon.web.Cookie.TO_CEYLON.converter().safeConvert(io.vertx.ext.web.Cookie.cookie(arg_0, arg_1));
43 | return ret;
44 | }
45 |
46 | }
47 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/src/main/ceylon/io/vertx/ceylon/web/handler/LoggerFormat.ceylon:
--------------------------------------------------------------------------------
1 | import io.vertx.lang.ceylon { Converter }
2 | import io.vertx.ext.web.handler { LoggerFormat_=LoggerFormat }
3 |
4 | " The possible out of the box formats.\n"
5 | shared abstract class LoggerFormat(shared String name) of default | short | tiny {
6 | }
7 |
8 | " remote-client - - [timestamp] \"method uri version\" status content-length \"referrer\" \"user-agent\"\n"
9 | shared object default extends LoggerFormat("DEFAULT") {}
10 | " remote-client - method uri version status content-length duration ms\n"
11 | shared object short extends LoggerFormat("SHORT") {}
12 | " method uri status - content-length duration\n"
13 | shared object tiny extends LoggerFormat("TINY") {}
14 |
15 | shared object loggerFormat {
16 |
17 | shared String toString(LoggerFormat val) {
18 | switch (val)
19 | case(default) { return "DEFAULT"; }
20 | case(short) { return "SHORT"; }
21 | case(tiny) { return "TINY"; }
22 | }
23 |
24 | shared LoggerFormat fromString(String val) {
25 | switch (val)
26 | case("DEFAULT") { return default; }
27 | case("SHORT") { return short; }
28 | case("TINY") { return tiny; }
29 | else {
30 | throw Exception("Invalid LoggerFormat value ``val``");
31 | }
32 | }
33 |
34 | shared object toJava extends Converter() {
35 | shared actual LoggerFormat_ convert(LoggerFormat src) {
36 | switch (src)
37 | case(default) { return LoggerFormat_.\iDEFAULT; }
38 | case(short) { return LoggerFormat_.\iSHORT; }
39 | case(tiny) { return LoggerFormat_.\iTINY; }
40 | }
41 | }
42 |
43 | shared object toCeylon extends Converter() {
44 | shared actual LoggerFormat convert(LoggerFormat_ src) {
45 | if (src == LoggerFormat_.\iDEFAULT) {
46 | return default;
47 | }
48 | if (src == LoggerFormat_.\iSHORT) {
49 | return short;
50 | }
51 | if (src == LoggerFormat_.\iTINY) {
52 | return tiny;
53 | }
54 | throw Exception("Invalid enum value");
55 | }
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/src/main/ceylon/io/vertx/ceylon/web/handler/bodyHandler_.java:
--------------------------------------------------------------------------------
1 | package io.vertx.ceylon.web.handler;
2 |
3 | import com.redhat.ceylon.compiler.java.metadata.Ceylon;
4 | import com.redhat.ceylon.compiler.java.metadata.TypeInfo;
5 | import com.redhat.ceylon.compiler.java.metadata.TypeParameter;
6 | import com.redhat.ceylon.compiler.java.metadata.TypeParameters;
7 | import com.redhat.ceylon.compiler.java.metadata.Variance;
8 | import com.redhat.ceylon.compiler.java.metadata.Ignore;
9 | import com.redhat.ceylon.compiler.java.metadata.Name;
10 | import com.redhat.ceylon.compiler.java.runtime.model.TypeDescriptor;
11 | import com.redhat.ceylon.compiler.java.runtime.model.ReifiedType;
12 | import ceylon.language.Callable;
13 | import ceylon.language.DocAnnotation$annotation$;
14 | import io.vertx.ceylon.web.RoutingContext;
15 | import io.vertx.core.Handler;
16 |
17 | @Ceylon(major = 8)
18 | @Name("bodyHandler")
19 | @com.redhat.ceylon.compiler.java.metadata.Object
20 | public class bodyHandler_ implements ReifiedType {
21 |
22 | private static final bodyHandler_ instance = new bodyHandler_();
23 | public static final TypeDescriptor $TypeDescriptor$ = TypeDescriptor.klass(bodyHandler_.class);
24 |
25 | @Ignore
26 | public TypeDescriptor $getType$() {
27 | return $TypeDescriptor$;
28 | }
29 |
30 | @Ignore
31 | @TypeInfo("io.vertx.ceylon.web.handler::bodyHandler")
32 | public static bodyHandler_ get_() {
33 | return instance;
34 | }
35 |
36 |
37 | @DocAnnotation$annotation$(description = " Create a body handler with defaults\n")
38 | @TypeInfo("io.vertx.ceylon.web.handler::BodyHandler")
39 | public BodyHandler create() {
40 | BodyHandler ret = io.vertx.ceylon.web.handler.BodyHandler.TO_CEYLON.converter().safeConvert(io.vertx.ext.web.handler.BodyHandler.create());
41 | return ret;
42 | }
43 |
44 | @DocAnnotation$annotation$(description = " Create a body handler and use the given upload directory.\n")
45 | @TypeInfo("io.vertx.ceylon.web.handler::BodyHandler")
46 | public BodyHandler create(
47 | final @TypeInfo("ceylon.language::String") @Name("uploadDirectory")@DocAnnotation$annotation$(description = "the uploads directory\n") ceylon.language.String uploadDirectory) {
48 | java.lang.String arg_0 = io.vertx.lang.ceylon.ToJava.String.safeConvert(uploadDirectory);
49 | BodyHandler ret = io.vertx.ceylon.web.handler.BodyHandler.TO_CEYLON.converter().safeConvert(io.vertx.ext.web.handler.BodyHandler.create(arg_0));
50 | return ret;
51 | }
52 |
53 | }
54 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/src/main/ceylon/io/vertx/ceylon/web/handler/chainAuthHandler_.java:
--------------------------------------------------------------------------------
1 | package io.vertx.ceylon.web.handler;
2 |
3 | import com.redhat.ceylon.compiler.java.metadata.Ceylon;
4 | import com.redhat.ceylon.compiler.java.metadata.TypeInfo;
5 | import com.redhat.ceylon.compiler.java.metadata.TypeParameter;
6 | import com.redhat.ceylon.compiler.java.metadata.TypeParameters;
7 | import com.redhat.ceylon.compiler.java.metadata.Variance;
8 | import com.redhat.ceylon.compiler.java.metadata.Ignore;
9 | import com.redhat.ceylon.compiler.java.metadata.Name;
10 | import com.redhat.ceylon.compiler.java.runtime.model.TypeDescriptor;
11 | import com.redhat.ceylon.compiler.java.runtime.model.ReifiedType;
12 | import ceylon.language.Callable;
13 | import ceylon.language.DocAnnotation$annotation$;
14 | import io.vertx.ceylon.auth.common.User;
15 | import java.util.Set;
16 | import io.vertx.core.json.JsonObject;
17 | import io.vertx.ceylon.web.RoutingContext;
18 | import io.vertx.core.AsyncResult;
19 | import io.vertx.core.Handler;
20 |
21 | @Ceylon(major = 8)
22 | @Name("chainAuthHandler")
23 | @com.redhat.ceylon.compiler.java.metadata.Object
24 | public class chainAuthHandler_ implements ReifiedType {
25 |
26 | private static final chainAuthHandler_ instance = new chainAuthHandler_();
27 | public static final TypeDescriptor $TypeDescriptor$ = TypeDescriptor.klass(chainAuthHandler_.class);
28 |
29 | @Ignore
30 | public TypeDescriptor $getType$() {
31 | return $TypeDescriptor$;
32 | }
33 |
34 | @Ignore
35 | @TypeInfo("io.vertx.ceylon.web.handler::chainAuthHandler")
36 | public static chainAuthHandler_ get_() {
37 | return instance;
38 | }
39 |
40 |
41 | @TypeInfo("io.vertx.ceylon.web.handler::ChainAuthHandler")
42 | public ChainAuthHandler create() {
43 | ChainAuthHandler ret = io.vertx.ceylon.web.handler.ChainAuthHandler.TO_CEYLON.converter().safeConvert(io.vertx.ext.web.handler.ChainAuthHandler.create());
44 | return ret;
45 | }
46 |
47 | }
48 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/src/main/ceylon/io/vertx/ceylon/web/handler/cookieHandler_.java:
--------------------------------------------------------------------------------
1 | package io.vertx.ceylon.web.handler;
2 |
3 | import com.redhat.ceylon.compiler.java.metadata.Ceylon;
4 | import com.redhat.ceylon.compiler.java.metadata.TypeInfo;
5 | import com.redhat.ceylon.compiler.java.metadata.TypeParameter;
6 | import com.redhat.ceylon.compiler.java.metadata.TypeParameters;
7 | import com.redhat.ceylon.compiler.java.metadata.Variance;
8 | import com.redhat.ceylon.compiler.java.metadata.Ignore;
9 | import com.redhat.ceylon.compiler.java.metadata.Name;
10 | import com.redhat.ceylon.compiler.java.runtime.model.TypeDescriptor;
11 | import com.redhat.ceylon.compiler.java.runtime.model.ReifiedType;
12 | import ceylon.language.Callable;
13 | import ceylon.language.DocAnnotation$annotation$;
14 | import io.vertx.ceylon.web.RoutingContext;
15 | import io.vertx.core.Handler;
16 |
17 | @Ceylon(major = 8)
18 | @Name("cookieHandler")
19 | @com.redhat.ceylon.compiler.java.metadata.Object
20 | public class cookieHandler_ implements ReifiedType {
21 |
22 | private static final cookieHandler_ instance = new cookieHandler_();
23 | public static final TypeDescriptor $TypeDescriptor$ = TypeDescriptor.klass(cookieHandler_.class);
24 |
25 | @Ignore
26 | public TypeDescriptor $getType$() {
27 | return $TypeDescriptor$;
28 | }
29 |
30 | @Ignore
31 | @TypeInfo("io.vertx.ceylon.web.handler::cookieHandler")
32 | public static cookieHandler_ get_() {
33 | return instance;
34 | }
35 |
36 |
37 | @DocAnnotation$annotation$(description = " Create a cookie handler\n")
38 | @TypeInfo("io.vertx.ceylon.web.handler::CookieHandler")
39 | public CookieHandler create() {
40 | CookieHandler ret = io.vertx.ceylon.web.handler.CookieHandler.TO_CEYLON.converter().safeConvert(io.vertx.ext.web.handler.CookieHandler.create());
41 | return ret;
42 | }
43 |
44 | }
45 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/src/main/ceylon/io/vertx/ceylon/web/handler/corsHandler_.java:
--------------------------------------------------------------------------------
1 | package io.vertx.ceylon.web.handler;
2 |
3 | import com.redhat.ceylon.compiler.java.metadata.Ceylon;
4 | import com.redhat.ceylon.compiler.java.metadata.TypeInfo;
5 | import com.redhat.ceylon.compiler.java.metadata.TypeParameter;
6 | import com.redhat.ceylon.compiler.java.metadata.TypeParameters;
7 | import com.redhat.ceylon.compiler.java.metadata.Variance;
8 | import com.redhat.ceylon.compiler.java.metadata.Ignore;
9 | import com.redhat.ceylon.compiler.java.metadata.Name;
10 | import com.redhat.ceylon.compiler.java.runtime.model.TypeDescriptor;
11 | import com.redhat.ceylon.compiler.java.runtime.model.ReifiedType;
12 | import ceylon.language.Callable;
13 | import ceylon.language.DocAnnotation$annotation$;
14 | import io.vertx.ceylon.core.http.HttpMethod;
15 | import io.vertx.ceylon.core.http.HttpMethod;
16 | import io.vertx.ceylon.core.http.HttpMethod;
17 | import io.vertx.ceylon.core.http.HttpMethod;
18 | import io.vertx.ceylon.core.http.HttpMethod;
19 | import io.vertx.ceylon.core.http.HttpMethod;
20 | import io.vertx.ceylon.core.http.HttpMethod;
21 | import io.vertx.ceylon.core.http.HttpMethod;
22 | import io.vertx.ceylon.core.http.HttpMethod;
23 | import io.vertx.ceylon.core.http.HttpMethod;
24 | import io.vertx.ceylon.core.http.HttpMethod;
25 | import java.util.Set;
26 | import io.vertx.ceylon.web.RoutingContext;
27 | import io.vertx.core.Handler;
28 |
29 | @Ceylon(major = 8)
30 | @Name("corsHandler")
31 | @com.redhat.ceylon.compiler.java.metadata.Object
32 | public class corsHandler_ implements ReifiedType {
33 |
34 | private static final corsHandler_ instance = new corsHandler_();
35 | public static final TypeDescriptor $TypeDescriptor$ = TypeDescriptor.klass(corsHandler_.class);
36 |
37 | @Ignore
38 | public TypeDescriptor $getType$() {
39 | return $TypeDescriptor$;
40 | }
41 |
42 | @Ignore
43 | @TypeInfo("io.vertx.ceylon.web.handler::corsHandler")
44 | public static corsHandler_ get_() {
45 | return instance;
46 | }
47 |
48 |
49 | @DocAnnotation$annotation$(description = " Create a CORS handler\n")
50 | @TypeInfo("io.vertx.ceylon.web.handler::CorsHandler")
51 | public CorsHandler create(
52 | final @TypeInfo("ceylon.language::String") @Name("allowedOriginPattern")@DocAnnotation$annotation$(description = "the allowed origin pattern\n") ceylon.language.String allowedOriginPattern) {
53 | java.lang.String arg_0 = io.vertx.lang.ceylon.ToJava.String.safeConvert(allowedOriginPattern);
54 | CorsHandler ret = io.vertx.ceylon.web.handler.CorsHandler.TO_CEYLON.converter().safeConvert(io.vertx.ext.web.handler.CorsHandler.create(arg_0));
55 | return ret;
56 | }
57 |
58 | }
59 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/src/main/ceylon/io/vertx/ceylon/web/handler/csrfHandler_.java:
--------------------------------------------------------------------------------
1 | package io.vertx.ceylon.web.handler;
2 |
3 | import com.redhat.ceylon.compiler.java.metadata.Ceylon;
4 | import com.redhat.ceylon.compiler.java.metadata.TypeInfo;
5 | import com.redhat.ceylon.compiler.java.metadata.TypeParameter;
6 | import com.redhat.ceylon.compiler.java.metadata.TypeParameters;
7 | import com.redhat.ceylon.compiler.java.metadata.Variance;
8 | import com.redhat.ceylon.compiler.java.metadata.Ignore;
9 | import com.redhat.ceylon.compiler.java.metadata.Name;
10 | import com.redhat.ceylon.compiler.java.runtime.model.TypeDescriptor;
11 | import com.redhat.ceylon.compiler.java.runtime.model.ReifiedType;
12 | import ceylon.language.Callable;
13 | import ceylon.language.DocAnnotation$annotation$;
14 | import io.vertx.ceylon.web.RoutingContext;
15 | import io.vertx.core.Handler;
16 |
17 | @Ceylon(major = 8)
18 | @Name("csrfHandler")
19 | @com.redhat.ceylon.compiler.java.metadata.Object
20 | public class csrfHandler_ implements ReifiedType {
21 |
22 | private static final csrfHandler_ instance = new csrfHandler_();
23 | public static final TypeDescriptor $TypeDescriptor$ = TypeDescriptor.klass(csrfHandler_.class);
24 |
25 | @Ignore
26 | public TypeDescriptor $getType$() {
27 | return $TypeDescriptor$;
28 | }
29 |
30 | @Ignore
31 | @TypeInfo("io.vertx.ceylon.web.handler::csrfHandler")
32 | public static csrfHandler_ get_() {
33 | return instance;
34 | }
35 |
36 |
37 | @DocAnnotation$annotation$(description = " Instantiate a new CSRFHandlerImpl with a secret\n \n
\n CSRFHandler.create(\"s3cr37\")\n
\n")
38 | @TypeInfo("io.vertx.ceylon.web.handler::CSRFHandler")
39 | public CSRFHandler create(
40 | final @TypeInfo("ceylon.language::String") @Name("secret")@DocAnnotation$annotation$(description = "server secret to sign the token.\n") ceylon.language.String secret) {
41 | java.lang.String arg_0 = io.vertx.lang.ceylon.ToJava.String.safeConvert(secret);
42 | CSRFHandler ret = io.vertx.ceylon.web.handler.CSRFHandler.TO_CEYLON.converter().safeConvert(io.vertx.ext.web.handler.CSRFHandler.create(arg_0));
43 | return ret;
44 | }
45 |
46 | }
47 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/src/main/ceylon/io/vertx/ceylon/web/handler/package.ceylon:
--------------------------------------------------------------------------------
1 | shared package io.vertx.ceylon.web.handler;
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/src/main/ceylon/io/vertx/ceylon/web/handler/responseContentTypeHandler_.java:
--------------------------------------------------------------------------------
1 | package io.vertx.ceylon.web.handler;
2 |
3 | import com.redhat.ceylon.compiler.java.metadata.Ceylon;
4 | import com.redhat.ceylon.compiler.java.metadata.TypeInfo;
5 | import com.redhat.ceylon.compiler.java.metadata.TypeParameter;
6 | import com.redhat.ceylon.compiler.java.metadata.TypeParameters;
7 | import com.redhat.ceylon.compiler.java.metadata.Variance;
8 | import com.redhat.ceylon.compiler.java.metadata.Ignore;
9 | import com.redhat.ceylon.compiler.java.metadata.Name;
10 | import com.redhat.ceylon.compiler.java.runtime.model.TypeDescriptor;
11 | import com.redhat.ceylon.compiler.java.runtime.model.ReifiedType;
12 | import ceylon.language.Callable;
13 | import ceylon.language.DocAnnotation$annotation$;
14 | import io.vertx.ceylon.web.RoutingContext;
15 | import io.vertx.core.Handler;
16 |
17 | @Ceylon(major = 8)
18 | @Name("responseContentTypeHandler")
19 | @com.redhat.ceylon.compiler.java.metadata.Object
20 | public class responseContentTypeHandler_ implements ReifiedType {
21 |
22 | private static final responseContentTypeHandler_ instance = new responseContentTypeHandler_();
23 | public static final TypeDescriptor $TypeDescriptor$ = TypeDescriptor.klass(responseContentTypeHandler_.class);
24 |
25 | @Ignore
26 | public TypeDescriptor $getType$() {
27 | return $TypeDescriptor$;
28 | }
29 |
30 | @Ignore
31 | @TypeInfo("io.vertx.ceylon.web.handler::responseContentTypeHandler")
32 | public static responseContentTypeHandler_ get_() {
33 | return instance;
34 | }
35 |
36 |
37 | @DocAnnotation$annotation$(description = " Create a response content type handler.\n")
38 | @TypeInfo("io.vertx.ceylon.web.handler::ResponseContentTypeHandler")
39 | public ResponseContentTypeHandler create() {
40 | ResponseContentTypeHandler ret = io.vertx.ceylon.web.handler.ResponseContentTypeHandler.TO_CEYLON.converter().safeConvert(io.vertx.ext.web.handler.ResponseContentTypeHandler.create());
41 | return ret;
42 | }
43 |
44 | @DocAnnotation$annotation$(description = " Create a response content type handler with a custom disable flag.\n")
45 | @TypeInfo("io.vertx.ceylon.web.handler::ResponseContentTypeHandler")
46 | public ResponseContentTypeHandler create(
47 | final @TypeInfo("ceylon.language::String") @Name("disableFlag") ceylon.language.String disableFlag) {
48 | java.lang.String arg_0 = io.vertx.lang.ceylon.ToJava.String.safeConvert(disableFlag);
49 | ResponseContentTypeHandler ret = io.vertx.ceylon.web.handler.ResponseContentTypeHandler.TO_CEYLON.converter().safeConvert(io.vertx.ext.web.handler.ResponseContentTypeHandler.create(arg_0));
50 | return ret;
51 | }
52 |
53 | }
54 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/src/main/ceylon/io/vertx/ceylon/web/handler/responseTimeHandler_.java:
--------------------------------------------------------------------------------
1 | package io.vertx.ceylon.web.handler;
2 |
3 | import com.redhat.ceylon.compiler.java.metadata.Ceylon;
4 | import com.redhat.ceylon.compiler.java.metadata.TypeInfo;
5 | import com.redhat.ceylon.compiler.java.metadata.TypeParameter;
6 | import com.redhat.ceylon.compiler.java.metadata.TypeParameters;
7 | import com.redhat.ceylon.compiler.java.metadata.Variance;
8 | import com.redhat.ceylon.compiler.java.metadata.Ignore;
9 | import com.redhat.ceylon.compiler.java.metadata.Name;
10 | import com.redhat.ceylon.compiler.java.runtime.model.TypeDescriptor;
11 | import com.redhat.ceylon.compiler.java.runtime.model.ReifiedType;
12 | import ceylon.language.Callable;
13 | import ceylon.language.DocAnnotation$annotation$;
14 | import io.vertx.ceylon.web.RoutingContext;
15 | import io.vertx.core.Handler;
16 |
17 | @Ceylon(major = 8)
18 | @Name("responseTimeHandler")
19 | @com.redhat.ceylon.compiler.java.metadata.Object
20 | public class responseTimeHandler_ implements ReifiedType {
21 |
22 | private static final responseTimeHandler_ instance = new responseTimeHandler_();
23 | public static final TypeDescriptor $TypeDescriptor$ = TypeDescriptor.klass(responseTimeHandler_.class);
24 |
25 | @Ignore
26 | public TypeDescriptor $getType$() {
27 | return $TypeDescriptor$;
28 | }
29 |
30 | @Ignore
31 | @TypeInfo("io.vertx.ceylon.web.handler::responseTimeHandler")
32 | public static responseTimeHandler_ get_() {
33 | return instance;
34 | }
35 |
36 |
37 | @DocAnnotation$annotation$(description = " Create a handler\n")
38 | @TypeInfo("io.vertx.ceylon.web.handler::ResponseTimeHandler")
39 | public ResponseTimeHandler create() {
40 | ResponseTimeHandler ret = io.vertx.ceylon.web.handler.ResponseTimeHandler.TO_CEYLON.converter().safeConvert(io.vertx.ext.web.handler.ResponseTimeHandler.create());
41 | return ret;
42 | }
43 |
44 | }
45 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/src/main/ceylon/io/vertx/ceylon/web/handler/sessionHandler_.java:
--------------------------------------------------------------------------------
1 | package io.vertx.ceylon.web.handler;
2 |
3 | import com.redhat.ceylon.compiler.java.metadata.Ceylon;
4 | import com.redhat.ceylon.compiler.java.metadata.TypeInfo;
5 | import com.redhat.ceylon.compiler.java.metadata.TypeParameter;
6 | import com.redhat.ceylon.compiler.java.metadata.TypeParameters;
7 | import com.redhat.ceylon.compiler.java.metadata.Variance;
8 | import com.redhat.ceylon.compiler.java.metadata.Ignore;
9 | import com.redhat.ceylon.compiler.java.metadata.Name;
10 | import com.redhat.ceylon.compiler.java.runtime.model.TypeDescriptor;
11 | import com.redhat.ceylon.compiler.java.runtime.model.ReifiedType;
12 | import ceylon.language.Callable;
13 | import ceylon.language.DocAnnotation$annotation$;
14 | import io.vertx.ceylon.web.sstore.SessionStore;
15 | import io.vertx.ceylon.web.RoutingContext;
16 | import io.vertx.core.Handler;
17 |
18 | @Ceylon(major = 8)
19 | @Name("sessionHandler")
20 | @com.redhat.ceylon.compiler.java.metadata.Object
21 | public class sessionHandler_ implements ReifiedType {
22 |
23 | private static final sessionHandler_ instance = new sessionHandler_();
24 | public static final TypeDescriptor $TypeDescriptor$ = TypeDescriptor.klass(sessionHandler_.class);
25 |
26 | @Ignore
27 | public TypeDescriptor $getType$() {
28 | return $TypeDescriptor$;
29 | }
30 |
31 | @Ignore
32 | @TypeInfo("io.vertx.ceylon.web.handler::sessionHandler")
33 | public static sessionHandler_ get_() {
34 | return instance;
35 | }
36 |
37 |
38 | @DocAnnotation$annotation$(description = " Create a session handler\n")
39 | @TypeInfo("io.vertx.ceylon.web.handler::SessionHandler")
40 | public SessionHandler create(
41 | final @TypeInfo("io.vertx.ceylon.web.sstore::SessionStore") @Name("sessionStore")@DocAnnotation$annotation$(description = "the session store\n") SessionStore sessionStore) {
42 | io.vertx.ext.web.sstore.SessionStore arg_0 = io.vertx.ceylon.web.sstore.SessionStore.TO_JAVA.safeConvert(sessionStore);
43 | SessionHandler ret = io.vertx.ceylon.web.handler.SessionHandler.TO_CEYLON.converter().safeConvert(io.vertx.ext.web.handler.SessionHandler.create(arg_0));
44 | return ret;
45 | }
46 |
47 | }
48 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/src/main/ceylon/io/vertx/ceylon/web/handler/sockjs/PermittedOptions.ceylon:
--------------------------------------------------------------------------------
1 | import io.vertx.ceylon.bridge.common {
2 | Io_vertx_ext_bridge_PermittedOptions=PermittedOptions
3 | }
4 | import ceylon.json {
5 | JsonObject=Object,
6 | JsonArray=Array,
7 | parse
8 | }
9 | import io.vertx.lang.ceylon {
10 | BaseDataObject,
11 | Converter,
12 | ToJava
13 | }
14 | import io.vertx.ext.web.handler.sockjs {
15 | PermittedOptions_=PermittedOptions
16 | }
17 | import ceylon.collection {
18 | HashMap
19 | }
20 | import io.vertx.core.json {
21 | JsonObject_=JsonObject,
22 | JsonArray_=JsonArray
23 | }
24 | /* Generated from io.vertx.ext.web.handler.sockjs.PermittedOptions */
25 | " Specify a match to allow for inbound and outbound traffic using the\n [BridgeOptions](../../handler/sockjs/BridgeOptions.type.html).\n"
26 | shared class PermittedOptions(
27 | String? address = null,
28 | String? addressRegex = null,
29 | JsonObject? match = null,
30 | String? requiredAuthority = null) extends Io_vertx_ext_bridge_PermittedOptions(
31 | address,
32 | addressRegex,
33 | match,
34 | requiredAuthority) satisfies BaseDataObject {
35 | shared actual default JsonObject toJson() {
36 | value json = super.toJson();
37 | return json;
38 | }
39 | }
40 |
41 | shared object permittedOptions {
42 |
43 | shared PermittedOptions fromJson(JsonObject json) {
44 | String? address = json.getStringOrNull("address");
45 | String? addressRegex = json.getStringOrNull("addressRegex");
46 | JsonObject? match = json.getObjectOrNull("match");
47 | String? requiredAuthority = json.getStringOrNull("requiredAuthority");
48 | return PermittedOptions {
49 | address = address;
50 | addressRegex = addressRegex;
51 | match = match;
52 | requiredAuthority = requiredAuthority;
53 | };
54 | }
55 |
56 | shared object toCeylon extends Converter() {
57 | shared actual PermittedOptions convert(PermittedOptions_ src) {
58 | value json = parse(src.toJson().string);
59 | assert(is JsonObject json);
60 | return fromJson(json);
61 | }
62 | }
63 |
64 | shared object toJava extends Converter() {
65 | shared actual PermittedOptions_ convert(PermittedOptions src) {
66 | // Todo : make optimized version without json
67 | value json = JsonObject_(src.toJson().string);
68 | value ret = PermittedOptions_(json);
69 | return ret;
70 | }
71 | }
72 | shared JsonObject toJson(PermittedOptions obj) => obj.toJson();
73 | }
74 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/src/main/ceylon/io/vertx/ceylon/web/handler/sockjs/package.ceylon:
--------------------------------------------------------------------------------
1 | shared package io.vertx.ceylon.web.handler.sockjs;
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/src/main/ceylon/io/vertx/ceylon/web/handler/staticHandler_.java:
--------------------------------------------------------------------------------
1 | package io.vertx.ceylon.web.handler;
2 |
3 | import com.redhat.ceylon.compiler.java.metadata.Ceylon;
4 | import com.redhat.ceylon.compiler.java.metadata.TypeInfo;
5 | import com.redhat.ceylon.compiler.java.metadata.TypeParameter;
6 | import com.redhat.ceylon.compiler.java.metadata.TypeParameters;
7 | import com.redhat.ceylon.compiler.java.metadata.Variance;
8 | import com.redhat.ceylon.compiler.java.metadata.Ignore;
9 | import com.redhat.ceylon.compiler.java.metadata.Name;
10 | import com.redhat.ceylon.compiler.java.runtime.model.TypeDescriptor;
11 | import com.redhat.ceylon.compiler.java.runtime.model.ReifiedType;
12 | import ceylon.language.Callable;
13 | import ceylon.language.DocAnnotation$annotation$;
14 | import java.util.List;
15 | import java.util.Set;
16 | import io.vertx.ceylon.web.RoutingContext;
17 | import io.vertx.core.Handler;
18 |
19 | @Ceylon(major = 8)
20 | @Name("staticHandler")
21 | @com.redhat.ceylon.compiler.java.metadata.Object
22 | public class staticHandler_ implements ReifiedType {
23 |
24 | private static final staticHandler_ instance = new staticHandler_();
25 | public static final TypeDescriptor $TypeDescriptor$ = TypeDescriptor.klass(staticHandler_.class);
26 |
27 | @Ignore
28 | public TypeDescriptor $getType$() {
29 | return $TypeDescriptor$;
30 | }
31 |
32 | @Ignore
33 | @TypeInfo("io.vertx.ceylon.web.handler::staticHandler")
34 | public static staticHandler_ get_() {
35 | return instance;
36 | }
37 |
38 |
39 | @DocAnnotation$annotation$(description = " Create a handler using defaults\n")
40 | @TypeInfo("io.vertx.ceylon.web.handler::StaticHandler")
41 | public StaticHandler create() {
42 | StaticHandler ret = io.vertx.ceylon.web.handler.StaticHandler.TO_CEYLON.converter().safeConvert(io.vertx.ext.web.handler.StaticHandler.create());
43 | return ret;
44 | }
45 |
46 | @DocAnnotation$annotation$(description = " Create a handler, specifying web-root\n")
47 | @TypeInfo("io.vertx.ceylon.web.handler::StaticHandler")
48 | public StaticHandler create(
49 | final @TypeInfo("ceylon.language::String") @Name("root")@DocAnnotation$annotation$(description = "the web-root\n") ceylon.language.String root) {
50 | java.lang.String arg_0 = io.vertx.lang.ceylon.ToJava.String.safeConvert(root);
51 | StaticHandler ret = io.vertx.ceylon.web.handler.StaticHandler.TO_CEYLON.converter().safeConvert(io.vertx.ext.web.handler.StaticHandler.create(arg_0));
52 | return ret;
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/src/main/ceylon/io/vertx/ceylon/web/handler/userSessionHandler_.java:
--------------------------------------------------------------------------------
1 | package io.vertx.ceylon.web.handler;
2 |
3 | import com.redhat.ceylon.compiler.java.metadata.Ceylon;
4 | import com.redhat.ceylon.compiler.java.metadata.TypeInfo;
5 | import com.redhat.ceylon.compiler.java.metadata.TypeParameter;
6 | import com.redhat.ceylon.compiler.java.metadata.TypeParameters;
7 | import com.redhat.ceylon.compiler.java.metadata.Variance;
8 | import com.redhat.ceylon.compiler.java.metadata.Ignore;
9 | import com.redhat.ceylon.compiler.java.metadata.Name;
10 | import com.redhat.ceylon.compiler.java.runtime.model.TypeDescriptor;
11 | import com.redhat.ceylon.compiler.java.runtime.model.ReifiedType;
12 | import ceylon.language.Callable;
13 | import ceylon.language.DocAnnotation$annotation$;
14 | import io.vertx.ceylon.web.RoutingContext;
15 | import io.vertx.core.Handler;
16 | import io.vertx.ceylon.auth.common.AuthProvider;
17 |
18 | @Ceylon(major = 8)
19 | @Name("userSessionHandler")
20 | @com.redhat.ceylon.compiler.java.metadata.Object
21 | public class userSessionHandler_ implements ReifiedType {
22 |
23 | private static final userSessionHandler_ instance = new userSessionHandler_();
24 | public static final TypeDescriptor $TypeDescriptor$ = TypeDescriptor.klass(userSessionHandler_.class);
25 |
26 | @Ignore
27 | public TypeDescriptor $getType$() {
28 | return $TypeDescriptor$;
29 | }
30 |
31 | @Ignore
32 | @TypeInfo("io.vertx.ceylon.web.handler::userSessionHandler")
33 | public static userSessionHandler_ get_() {
34 | return instance;
35 | }
36 |
37 |
38 | @DocAnnotation$annotation$(description = " Create a new handler\n")
39 | @TypeInfo("io.vertx.ceylon.web.handler::UserSessionHandler")
40 | public UserSessionHandler create(
41 | final @TypeInfo("io.vertx.ceylon.auth.common::AuthProvider") @Name("authProvider")@DocAnnotation$annotation$(description = "The auth provider to use\n") AuthProvider authProvider) {
42 | io.vertx.ext.auth.AuthProvider arg_0 = io.vertx.ceylon.auth.common.AuthProvider.TO_JAVA.safeConvert(authProvider);
43 | UserSessionHandler ret = io.vertx.ceylon.web.handler.UserSessionHandler.TO_CEYLON.converter().safeConvert(io.vertx.ext.web.handler.UserSessionHandler.create(arg_0));
44 | return ret;
45 | }
46 |
47 | }
48 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/src/main/ceylon/io/vertx/ceylon/web/handler/virtualHostHandler_.java:
--------------------------------------------------------------------------------
1 | package io.vertx.ceylon.web.handler;
2 |
3 | import com.redhat.ceylon.compiler.java.metadata.Ceylon;
4 | import com.redhat.ceylon.compiler.java.metadata.TypeInfo;
5 | import com.redhat.ceylon.compiler.java.metadata.TypeParameter;
6 | import com.redhat.ceylon.compiler.java.metadata.TypeParameters;
7 | import com.redhat.ceylon.compiler.java.metadata.Variance;
8 | import com.redhat.ceylon.compiler.java.metadata.Ignore;
9 | import com.redhat.ceylon.compiler.java.metadata.Name;
10 | import com.redhat.ceylon.compiler.java.runtime.model.TypeDescriptor;
11 | import com.redhat.ceylon.compiler.java.runtime.model.ReifiedType;
12 | import ceylon.language.Callable;
13 | import ceylon.language.DocAnnotation$annotation$;
14 | import io.vertx.ceylon.web.RoutingContext;
15 | import io.vertx.core.Handler;
16 |
17 | @Ceylon(major = 8)
18 | @Name("virtualHostHandler")
19 | @com.redhat.ceylon.compiler.java.metadata.Object
20 | public class virtualHostHandler_ implements ReifiedType {
21 |
22 | private static final virtualHostHandler_ instance = new virtualHostHandler_();
23 | public static final TypeDescriptor $TypeDescriptor$ = TypeDescriptor.klass(virtualHostHandler_.class);
24 |
25 | @Ignore
26 | public TypeDescriptor $getType$() {
27 | return $TypeDescriptor$;
28 | }
29 |
30 | @Ignore
31 | @TypeInfo("io.vertx.ceylon.web.handler::virtualHostHandler")
32 | public static virtualHostHandler_ get_() {
33 | return instance;
34 | }
35 |
36 |
37 | @DocAnnotation$annotation$(description = " Create a handler\n")
38 | @TypeInfo("io.vertx.ceylon.web.handler::VirtualHostHandler")
39 | public VirtualHostHandler create(
40 | final @TypeInfo("ceylon.language::String") @Name("hostname") ceylon.language.String hostname,
41 | final @TypeInfo("ceylon.language::Anything(io.vertx.ceylon.web::RoutingContext)") @Name("handler") Callable> handler) {
42 | java.lang.String arg_0 = io.vertx.lang.ceylon.ToJava.String.safeConvert(hostname);
43 | io.vertx.core.Handler arg_1 = handler == null ? null : new io.vertx.core.Handler() {
44 | public void handle(io.vertx.ext.web.RoutingContext event) {
45 | handler.$call$((Object)io.vertx.ceylon.web.RoutingContext.TO_CEYLON.converter().safeConvert(event));
46 | }
47 | };
48 | VirtualHostHandler ret = io.vertx.ceylon.web.handler.VirtualHostHandler.TO_CEYLON.converter().safeConvert(io.vertx.ext.web.handler.VirtualHostHandler.create(arg_0, arg_1));
49 | return ret;
50 | }
51 |
52 | }
53 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/src/main/ceylon/io/vertx/ceylon/web/module.ceylon:
--------------------------------------------------------------------------------
1 | native("jvm")
2 | module io.vertx.ceylon.web "${project.version}" {
3 | native("jvm") import java.base "7";
4 | shared import ceylon.json "1.3.3";
5 | shared import io.vertx.ceylon.core "${project.version}";
6 | shared import "io.vertx.vertx-web" "${project.version}";
7 | shared import io.vertx.ceylon.bridge.common "${project.version}";
8 | shared import io.vertx.ceylon.auth.common "${project.version}";
9 | shared optional import io.vertx.ceylon.auth.jwt "${project.version}";
10 | shared optional import io.vertx.ceylon.auth.oauth2 "${project.version}";
11 | shared optional import io.vertx.ceylon.auth.htdigest "${project.version}";
12 | shared optional import "io.vertx.vertx-web-templ-handlebars" "${project.version}";
13 | shared optional import "io.vertx.vertx-web-templ-thymeleaf" "${project.version}";
14 | shared optional import "io.vertx.vertx-web-templ-jade" "${project.version}";
15 | shared optional import "io.vertx.vertx-web-templ-mvel" "${project.version}";
16 | shared optional import "io.vertx.vertx-web-templ-pebble" "${project.version}";
17 | shared optional import "io.vertx.vertx-web-templ-freemarker" "${project.version}";
18 | }
19 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/src/main/ceylon/io/vertx/ceylon/web/package.ceylon:
--------------------------------------------------------------------------------
1 | shared package io.vertx.ceylon.web;
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/src/main/ceylon/io/vertx/ceylon/web/router_.java:
--------------------------------------------------------------------------------
1 | package io.vertx.ceylon.web;
2 |
3 | import com.redhat.ceylon.compiler.java.metadata.Ceylon;
4 | import com.redhat.ceylon.compiler.java.metadata.TypeInfo;
5 | import com.redhat.ceylon.compiler.java.metadata.TypeParameter;
6 | import com.redhat.ceylon.compiler.java.metadata.TypeParameters;
7 | import com.redhat.ceylon.compiler.java.metadata.Variance;
8 | import com.redhat.ceylon.compiler.java.metadata.Ignore;
9 | import com.redhat.ceylon.compiler.java.metadata.Name;
10 | import com.redhat.ceylon.compiler.java.runtime.model.TypeDescriptor;
11 | import com.redhat.ceylon.compiler.java.runtime.model.ReifiedType;
12 | import ceylon.language.Callable;
13 | import ceylon.language.DocAnnotation$annotation$;
14 | import io.vertx.ceylon.core.http.HttpServerRequest;
15 | import java.util.List;
16 | import io.vertx.ceylon.core.http.HttpMethod;
17 | import io.vertx.ceylon.core.http.HttpMethod;
18 | import io.vertx.ceylon.core.http.HttpMethod;
19 | import io.vertx.ceylon.core.http.HttpMethod;
20 | import io.vertx.ceylon.core.http.HttpMethod;
21 | import io.vertx.ceylon.core.http.HttpMethod;
22 | import io.vertx.ceylon.core.http.HttpMethod;
23 | import io.vertx.ceylon.core.http.HttpMethod;
24 | import io.vertx.ceylon.core.http.HttpMethod;
25 | import io.vertx.ceylon.core.http.HttpMethod;
26 | import io.vertx.ceylon.core.http.HttpMethod;
27 | import io.vertx.ceylon.core.Vertx;
28 | import io.vertx.core.Handler;
29 |
30 | @Ceylon(major = 8)
31 | @Name("router")
32 | @com.redhat.ceylon.compiler.java.metadata.Object
33 | public class router_ implements ReifiedType {
34 |
35 | private static final router_ instance = new router_();
36 | public static final TypeDescriptor $TypeDescriptor$ = TypeDescriptor.klass(router_.class);
37 |
38 | @Ignore
39 | public TypeDescriptor $getType$() {
40 | return $TypeDescriptor$;
41 | }
42 |
43 | @Ignore
44 | @TypeInfo("io.vertx.ceylon.web::router")
45 | public static router_ get_() {
46 | return instance;
47 | }
48 |
49 |
50 | @DocAnnotation$annotation$(description = " Create a router\n")
51 | @TypeInfo("io.vertx.ceylon.web::Router")
52 | public Router router(
53 | final @TypeInfo("io.vertx.ceylon.core::Vertx") @Name("vertx")@DocAnnotation$annotation$(description = "the Vert.x instance\n") Vertx vertx) {
54 | io.vertx.core.Vertx arg_0 = io.vertx.ceylon.core.Vertx.TO_JAVA.safeConvert(vertx);
55 | Router ret = io.vertx.ceylon.web.Router.TO_CEYLON.converter().safeConvert(io.vertx.ext.web.Router.router(arg_0));
56 | return ret;
57 | }
58 |
59 | }
60 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/src/main/ceylon/io/vertx/ceylon/web/sstore/package.ceylon:
--------------------------------------------------------------------------------
1 | shared package io.vertx.ceylon.web.sstore;
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/src/main/ceylon/io/vertx/ceylon/web/templ/handlebars/handlebarsTemplateEngine_.java:
--------------------------------------------------------------------------------
1 | package io.vertx.ceylon.web.templ.handlebars;
2 |
3 | import com.redhat.ceylon.compiler.java.metadata.Ceylon;
4 | import com.redhat.ceylon.compiler.java.metadata.TypeInfo;
5 | import com.redhat.ceylon.compiler.java.metadata.TypeParameter;
6 | import com.redhat.ceylon.compiler.java.metadata.TypeParameters;
7 | import com.redhat.ceylon.compiler.java.metadata.Variance;
8 | import com.redhat.ceylon.compiler.java.metadata.Ignore;
9 | import com.redhat.ceylon.compiler.java.metadata.Name;
10 | import com.redhat.ceylon.compiler.java.runtime.model.TypeDescriptor;
11 | import com.redhat.ceylon.compiler.java.runtime.model.ReifiedType;
12 | import ceylon.language.Callable;
13 | import ceylon.language.DocAnnotation$annotation$;
14 | import io.vertx.ceylon.core.buffer.Buffer;
15 | import io.vertx.ceylon.web.templ.TemplateEngine;
16 | import io.vertx.ceylon.web.RoutingContext;
17 | import io.vertx.core.AsyncResult;
18 | import io.vertx.core.Handler;
19 |
20 | @Ceylon(major = 8)
21 | @Name("handlebarsTemplateEngine")
22 | @com.redhat.ceylon.compiler.java.metadata.Object
23 | public class handlebarsTemplateEngine_ implements ReifiedType {
24 |
25 | private static final handlebarsTemplateEngine_ instance = new handlebarsTemplateEngine_();
26 | public static final TypeDescriptor $TypeDescriptor$ = TypeDescriptor.klass(handlebarsTemplateEngine_.class);
27 |
28 | @Ignore
29 | public TypeDescriptor $getType$() {
30 | return $TypeDescriptor$;
31 | }
32 |
33 | @Ignore
34 | @TypeInfo("io.vertx.ceylon.web.templ.handlebars::handlebarsTemplateEngine")
35 | public static handlebarsTemplateEngine_ get_() {
36 | return instance;
37 | }
38 |
39 |
40 | @DocAnnotation$annotation$(description = " Create a template engine using defaults\n")
41 | @TypeInfo("io.vertx.ceylon.web.templ.handlebars::HandlebarsTemplateEngine")
42 | public HandlebarsTemplateEngine create() {
43 | HandlebarsTemplateEngine ret = io.vertx.ceylon.web.templ.handlebars.HandlebarsTemplateEngine.TO_CEYLON.converter().safeConvert(io.vertx.ext.web.templ.handlebars.HandlebarsTemplateEngine.create());
44 | return ret;
45 | }
46 |
47 | }
48 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/src/main/ceylon/io/vertx/ceylon/web/templ/handlebars/package.ceylon:
--------------------------------------------------------------------------------
1 | shared package io.vertx.ceylon.web.templ.handlebars;
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/src/main/ceylon/io/vertx/ceylon/web/templ/jade/jadeTemplateEngine_.java:
--------------------------------------------------------------------------------
1 | package io.vertx.ceylon.web.templ.jade;
2 |
3 | import com.redhat.ceylon.compiler.java.metadata.Ceylon;
4 | import com.redhat.ceylon.compiler.java.metadata.TypeInfo;
5 | import com.redhat.ceylon.compiler.java.metadata.TypeParameter;
6 | import com.redhat.ceylon.compiler.java.metadata.TypeParameters;
7 | import com.redhat.ceylon.compiler.java.metadata.Variance;
8 | import com.redhat.ceylon.compiler.java.metadata.Ignore;
9 | import com.redhat.ceylon.compiler.java.metadata.Name;
10 | import com.redhat.ceylon.compiler.java.runtime.model.TypeDescriptor;
11 | import com.redhat.ceylon.compiler.java.runtime.model.ReifiedType;
12 | import ceylon.language.Callable;
13 | import ceylon.language.DocAnnotation$annotation$;
14 | import io.vertx.ceylon.core.buffer.Buffer;
15 | import io.vertx.ceylon.web.templ.TemplateEngine;
16 | import io.vertx.ceylon.web.RoutingContext;
17 | import io.vertx.core.AsyncResult;
18 | import io.vertx.core.Handler;
19 |
20 | @Ceylon(major = 8)
21 | @Name("jadeTemplateEngine")
22 | @com.redhat.ceylon.compiler.java.metadata.Object
23 | public class jadeTemplateEngine_ implements ReifiedType {
24 |
25 | private static final jadeTemplateEngine_ instance = new jadeTemplateEngine_();
26 | public static final TypeDescriptor $TypeDescriptor$ = TypeDescriptor.klass(jadeTemplateEngine_.class);
27 |
28 | @Ignore
29 | public TypeDescriptor $getType$() {
30 | return $TypeDescriptor$;
31 | }
32 |
33 | @Ignore
34 | @TypeInfo("io.vertx.ceylon.web.templ.jade::jadeTemplateEngine")
35 | public static jadeTemplateEngine_ get_() {
36 | return instance;
37 | }
38 |
39 |
40 | @DocAnnotation$annotation$(description = " Create a template engine using defaults\n")
41 | @TypeInfo("io.vertx.ceylon.web.templ.jade::JadeTemplateEngine")
42 | public JadeTemplateEngine create() {
43 | JadeTemplateEngine ret = io.vertx.ceylon.web.templ.jade.JadeTemplateEngine.TO_CEYLON.converter().safeConvert(io.vertx.ext.web.templ.jade.JadeTemplateEngine.create());
44 | return ret;
45 | }
46 |
47 | }
48 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/src/main/ceylon/io/vertx/ceylon/web/templ/jade/package.ceylon:
--------------------------------------------------------------------------------
1 | shared package io.vertx.ceylon.web.templ.jade;
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/src/main/ceylon/io/vertx/ceylon/web/templ/mvel/mvelTemplateEngine_.java:
--------------------------------------------------------------------------------
1 | package io.vertx.ceylon.web.templ.mvel;
2 |
3 | import com.redhat.ceylon.compiler.java.metadata.Ceylon;
4 | import com.redhat.ceylon.compiler.java.metadata.TypeInfo;
5 | import com.redhat.ceylon.compiler.java.metadata.TypeParameter;
6 | import com.redhat.ceylon.compiler.java.metadata.TypeParameters;
7 | import com.redhat.ceylon.compiler.java.metadata.Variance;
8 | import com.redhat.ceylon.compiler.java.metadata.Ignore;
9 | import com.redhat.ceylon.compiler.java.metadata.Name;
10 | import com.redhat.ceylon.compiler.java.runtime.model.TypeDescriptor;
11 | import com.redhat.ceylon.compiler.java.runtime.model.ReifiedType;
12 | import ceylon.language.Callable;
13 | import ceylon.language.DocAnnotation$annotation$;
14 | import io.vertx.ceylon.core.buffer.Buffer;
15 | import io.vertx.ceylon.web.templ.TemplateEngine;
16 | import io.vertx.ceylon.web.RoutingContext;
17 | import io.vertx.core.AsyncResult;
18 | import io.vertx.core.Handler;
19 |
20 | @Ceylon(major = 8)
21 | @Name("mvelTemplateEngine")
22 | @com.redhat.ceylon.compiler.java.metadata.Object
23 | public class mvelTemplateEngine_ implements ReifiedType {
24 |
25 | private static final mvelTemplateEngine_ instance = new mvelTemplateEngine_();
26 | public static final TypeDescriptor $TypeDescriptor$ = TypeDescriptor.klass(mvelTemplateEngine_.class);
27 |
28 | @Ignore
29 | public TypeDescriptor $getType$() {
30 | return $TypeDescriptor$;
31 | }
32 |
33 | @Ignore
34 | @TypeInfo("io.vertx.ceylon.web.templ.mvel::mvelTemplateEngine")
35 | public static mvelTemplateEngine_ get_() {
36 | return instance;
37 | }
38 |
39 |
40 | @DocAnnotation$annotation$(description = " Create a template engine using defaults\n")
41 | @TypeInfo("io.vertx.ceylon.web.templ.mvel::MVELTemplateEngine")
42 | public MVELTemplateEngine create() {
43 | MVELTemplateEngine ret = io.vertx.ceylon.web.templ.mvel.MVELTemplateEngine.TO_CEYLON.converter().safeConvert(io.vertx.ext.web.templ.mvel.MVELTemplateEngine.create());
44 | return ret;
45 | }
46 |
47 | }
48 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/src/main/ceylon/io/vertx/ceylon/web/templ/mvel/package.ceylon:
--------------------------------------------------------------------------------
1 | shared package io.vertx.ceylon.web.templ.mvel;
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/src/main/ceylon/io/vertx/ceylon/web/templ/package.ceylon:
--------------------------------------------------------------------------------
1 | shared package io.vertx.ceylon.web.templ;
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/src/main/ceylon/io/vertx/ceylon/web/templ/thymeleaf/package.ceylon:
--------------------------------------------------------------------------------
1 | shared package io.vertx.ceylon.web.templ.thymeleaf;
--------------------------------------------------------------------------------
/vertx-lang-ceylon-stack/src/main/ceylon/io/vertx/ceylon/web/templ/thymeleaf/thymeleafTemplateEngine_.java:
--------------------------------------------------------------------------------
1 | package io.vertx.ceylon.web.templ.thymeleaf;
2 |
3 | import com.redhat.ceylon.compiler.java.metadata.Ceylon;
4 | import com.redhat.ceylon.compiler.java.metadata.TypeInfo;
5 | import com.redhat.ceylon.compiler.java.metadata.TypeParameter;
6 | import com.redhat.ceylon.compiler.java.metadata.TypeParameters;
7 | import com.redhat.ceylon.compiler.java.metadata.Variance;
8 | import com.redhat.ceylon.compiler.java.metadata.Ignore;
9 | import com.redhat.ceylon.compiler.java.metadata.Name;
10 | import com.redhat.ceylon.compiler.java.runtime.model.TypeDescriptor;
11 | import com.redhat.ceylon.compiler.java.runtime.model.ReifiedType;
12 | import ceylon.language.Callable;
13 | import ceylon.language.DocAnnotation$annotation$;
14 | import io.vertx.ceylon.core.buffer.Buffer;
15 | import io.vertx.ceylon.web.templ.TemplateEngine;
16 | import org.thymeleaf.templatemode.TemplateMode;
17 | import io.vertx.ceylon.web.RoutingContext;
18 | import io.vertx.core.AsyncResult;
19 | import io.vertx.core.Handler;
20 |
21 | @Ceylon(major = 8)
22 | @Name("thymeleafTemplateEngine")
23 | @com.redhat.ceylon.compiler.java.metadata.Object
24 | public class thymeleafTemplateEngine_ implements ReifiedType {
25 |
26 | private static final thymeleafTemplateEngine_ instance = new thymeleafTemplateEngine_();
27 | public static final TypeDescriptor $TypeDescriptor$ = TypeDescriptor.klass(thymeleafTemplateEngine_.class);
28 |
29 | @Ignore
30 | public TypeDescriptor $getType$() {
31 | return $TypeDescriptor$;
32 | }
33 |
34 | @Ignore
35 | @TypeInfo("io.vertx.ceylon.web.templ.thymeleaf::thymeleafTemplateEngine")
36 | public static thymeleafTemplateEngine_ get_() {
37 | return instance;
38 | }
39 |
40 |
41 | @DocAnnotation$annotation$(description = " Create a template engine using defaults\n")
42 | @TypeInfo("io.vertx.ceylon.web.templ.thymeleaf::ThymeleafTemplateEngine")
43 | public ThymeleafTemplateEngine create() {
44 | ThymeleafTemplateEngine ret = io.vertx.ceylon.web.templ.thymeleaf.ThymeleafTemplateEngine.TO_CEYLON.converter().safeConvert(io.vertx.ext.web.templ.thymeleaf.ThymeleafTemplateEngine.create());
45 | return ret;
46 | }
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon/.ceylon/config:
--------------------------------------------------------------------------------
1 | [repositories]
2 | lookup=../target/repo
3 | output=./target/modules
4 |
5 | [defaults]
6 | offline=false
7 | flatclasspath=false
8 | autoexportmavendependencies=false
9 | encoding=UTF-8
10 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon/.ceylon/config~:
--------------------------------------------------------------------------------
1 | [repositories]
2 | lookup=../target/repo
3 | output=./target/modules
4 |
5 | [defaults]
6 | offline=false
7 | flatclasspath=false
8 | autoexportmavendependencies=false
9 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon/.ceylon/ide-config:
--------------------------------------------------------------------------------
1 |
2 | [project]
3 | compile-jvm=true
4 | compile-js=false
5 | system-repository=
6 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon/.ceylon/ide-config~:
--------------------------------------------------------------------------------
1 |
2 | [project]
3 | compile-jvm=true
4 | compile-js=false
5 | system-repository=
6 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon/config:
--------------------------------------------------------------------------------
1 | [repositories]
2 | global=./target/repo
3 |
4 | [repository.LOCAL]
5 | url=./target/modules
6 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon/descriptors/com.fasterxml.jackson.annotations.properties:
--------------------------------------------------------------------------------
1 | +java.base=7
2 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon/descriptors/com.fasterxml.jackson.core.properties:
--------------------------------------------------------------------------------
1 | +java.base=7
2 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon/descriptors/com.fasterxml.jackson.databind.properties:
--------------------------------------------------------------------------------
1 | +java.base=7
2 | +java.jdbc=7
3 | +javax.xml=7
4 | +com.fasterxml.jackson.core=2.9.5
5 | +com.fasterxml.jackson.annotations=2.9.5
6 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon/descriptors/com.hazelcast.hazelcast.properties:
--------------------------------------------------------------------------------
1 | +java.base=7
2 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon/descriptors/io.netty.netty-all.properties:
--------------------------------------------------------------------------------
1 | +java.base=7
2 | java.logging=7
3 | +java.tls=7
4 | oracle.jdk.base=7
5 | +oracle.jdk.sctp=7
6 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon/descriptors/io.vertx.vertx-codegen-tck.properties:
--------------------------------------------------------------------------------
1 | +java.base=7
2 | +io.vertx.vertx-core=${project.version}
3 | +io.vertx.vertx-codegen=${project.version}
4 | junit.junit=4.11
5 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon/descriptors/io.vertx.vertx-codegen.properties:
--------------------------------------------------------------------------------
1 | +java.base=7
2 | +java.compiler=7
3 | com.fasterxml.jackson.databind=2.9.5
4 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon/descriptors/io.vertx.vertx-core.properties:
--------------------------------------------------------------------------------
1 | +java.base=7
2 | +java.logging=7
3 | +java.compiler=7
4 | +java.tls=7
5 | +oracle.jdk.base=7
6 | com.fasterxml.jackson.databind=2.9.5
7 | +com.fasterxml.jackson.core=2.9.5
8 | +io.netty.netty-all=4.1.15.Final
9 | +io.vertx.vertx-codegen=${project.version}
10 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon/descriptors/io.vertx.vertx-hazelcast.properties:
--------------------------------------------------------------------------------
1 | +java.base=7
2 | +java.logging=7
3 | +java.compiler=7
4 | +java.tls=7
5 | +oracle.jdk.base=7
6 | com.hazelcast.hazelcast=3.6.3
7 | +io.vertx.vertx-core=${project.version}
--------------------------------------------------------------------------------
/vertx-lang-ceylon/descriptors/junit.junit.properties:
--------------------------------------------------------------------------------
1 | +java.base=7
2 | +org.hamcrest.hamcrest-core=1.3
3 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon/descriptors/org.hamcrest.hamcrest-core.properties:
--------------------------------------------------------------------------------
1 | +java.base=7
2 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/main/asciidoc/ceylon/override/buffer_from_bytes.adoc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vert-x3/vertx-lang-ceylon/b63446c7b3b9fe7d0eeccb7e3ac3254909e93c19/vertx-lang-ceylon/src/main/asciidoc/ceylon/override/buffer_from_bytes.adoc
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/main/asciidoc/ceylon/override/dependencies.adoc:
--------------------------------------------------------------------------------
1 | If you are embedding Vert.x in Ceylon you should import Vert.x modules of your Ceylon module:
2 |
3 | [source,xml,subs="+attributes"]
4 | ----
5 | native("jvm")
6 | module my.module "1.0.0" {
7 | shared import io.vertx.ceylon.core "3.6.0-SNAPSHOT";
8 | }
9 | ----
10 |
11 | The following stack of modules is supported in 3.6.0-SNAPSHOT:
12 |
13 | - `io.vertx.ceylon.core`
14 | - `io.vertx.ceylon.jdbc`
15 | - `io.vertx.ceylon.sql`
16 | - `io.vertx.ceylon.web`
17 | - `io.vertx.ceylon.auth.common`
18 | - `io.vertx.ceylon.auth.jdbc`
19 | - `io.vertx.ceylon.auth.jwt`
20 | - `io.vertx.ceylon.auth.oauth2`
21 | - `io.vertx.ceylon.auth.shiro`
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/main/asciidoc/ceylon/override/dns.adoc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vert-x3/vertx-lang-ceylon/b63446c7b3b9fe7d0eeccb7e3ac3254909e93c19/vertx-lang-ceylon/src/main/asciidoc/ceylon/override/dns.adoc
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/main/asciidoc/ceylon/override/eventbus.adoc:
--------------------------------------------------------------------------------
1 | ==== Message Codecs
2 |
3 | Message codecs are available exclusively with the Java api.
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/main/asciidoc/ceylon/override/eventbus_headers.adoc:
--------------------------------------------------------------------------------
1 | Message delivery headers are available exclusively with the Java api.
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/main/asciidoc/ceylon/override/json.adoc:
--------------------------------------------------------------------------------
1 | == JSON
2 |
3 | Ceylon uses the https://herd.ceylon-lang.org/modules/ceylon.json[ceylon.json] module for http://json.org/[JSON].
4 |
5 | === JSON objects
6 |
7 | Ceylon uses `ceylon.json::Object` for representing a JSON object.
8 |
9 | === JSON arrays
10 |
11 | Ceylon uses `ceylon.json::Array` for representing a JSON array
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/main/asciidoc/ceylon/override/verticle-configuration.adoc:
--------------------------------------------------------------------------------
1 | === Passing configuration to a verticle
2 |
3 | Configuration in the form of JSON can be passed to a verticle at deployment time:
4 |
5 | [source]
6 | ----
7 | value config = JsonObject {
8 | "name"->"Tim",
9 | "directory"->"blah"
10 | };
11 | value options = DeploymentOptions {
12 | config = config;
13 | };
14 |
15 | vertx.deployVerticle("otherVerticle.java", options);
16 | ----
17 |
18 | NOTE: we suppose `ceylon.json::Object` is aliased to `JsonObject`
19 |
20 | This configuration is then available via the `io.vertx.ceylon.core::Context` object.
21 |
22 | The configuration is returned as a
23 | `JsonObject` object so you can retrieve data as follows:
24 |
25 | [source]
26 | ----
27 | print("``vertx.getOrCreateContext().config()?.get("name") else "no config"``")
28 | ----
29 |
30 | === Accessing environment variables in a Verticle
31 |
32 | Environment variables and system properties are accessible from a verticle using the Java API:
33 |
34 | [source,javascript]
35 | ----
36 | print("``System.getProperty("foo")``");
37 | print("``System.getenv("HOME")``");
38 | ----
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/main/assembly/docs.xml:
--------------------------------------------------------------------------------
1 |
4 | docs
5 |
6 | zip
7 |
8 | false
9 |
10 |
11 | ${project.basedir}/src/main/asciidoc/ceylon
12 | /vertx-core/ceylon
13 |
14 |
15 | ${project.basedir}/../target/repo/io/vertx/ceylon/core/${project.version}/module-doc/api/
16 | /ceylondoc/vertx-core
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/main/ceylon/io/vertx/ceylon/core/Helper.java:
--------------------------------------------------------------------------------
1 | package io.vertx.ceylon.core;
2 |
3 | import java.lang.reflect.Method;
4 |
5 | import io.vertx.core.AsyncResult;
6 | import io.vertx.core.DeploymentOptions;
7 | import io.vertx.core.Handler;
8 | import io.vertx.core.Verticle;
9 | import io.vertx.core.Vertx;
10 |
11 | class Helper {
12 | static void deployVerticle(Object vertx, Verticle verticle, DeploymentOptions options, Handler> completionHandler) throws Exception {
13 | Method m = vertx.getClass().getMethod("getDelegate");
14 | Vertx delegate = (Vertx)m.invoke(vertx);
15 | delegate.deployVerticle(verticle, options, completionHandler);
16 | }
17 | }
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/main/ceylon/io/vertx/ceylon/core/buffer/package.ceylon:
--------------------------------------------------------------------------------
1 | shared package io.vertx.ceylon.core.buffer;
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/main/ceylon/io/vertx/ceylon/core/cli/cli_.java:
--------------------------------------------------------------------------------
1 | package io.vertx.ceylon.core.cli;
2 |
3 | import com.redhat.ceylon.compiler.java.metadata.Ceylon;
4 | import com.redhat.ceylon.compiler.java.metadata.TypeInfo;
5 | import com.redhat.ceylon.compiler.java.metadata.TypeParameter;
6 | import com.redhat.ceylon.compiler.java.metadata.TypeParameters;
7 | import com.redhat.ceylon.compiler.java.metadata.Variance;
8 | import com.redhat.ceylon.compiler.java.metadata.Ignore;
9 | import com.redhat.ceylon.compiler.java.metadata.Name;
10 | import com.redhat.ceylon.compiler.java.runtime.model.TypeDescriptor;
11 | import com.redhat.ceylon.compiler.java.runtime.model.ReifiedType;
12 | import ceylon.language.Callable;
13 | import ceylon.language.DocAnnotation$annotation$;
14 | import java.util.List;
15 |
16 | @Ceylon(major = 8)
17 | @Name("cli")
18 | @com.redhat.ceylon.compiler.java.metadata.Object
19 | public class cli_ implements ReifiedType {
20 |
21 | private static final cli_ instance = new cli_();
22 | public static final TypeDescriptor $TypeDescriptor$ = TypeDescriptor.klass(cli_.class);
23 |
24 | @Ignore
25 | public TypeDescriptor $getType$() {
26 | return $TypeDescriptor$;
27 | }
28 |
29 | @Ignore
30 | @TypeInfo("io.vertx.ceylon.core.cli::cli")
31 | public static cli_ get_() {
32 | return instance;
33 | }
34 |
35 |
36 | @DocAnnotation$annotation$(description = " Creates an instance of [CLI](../cli/CLI.type.html) using the default implementation.\n")
37 | @TypeInfo("io.vertx.ceylon.core.cli::CLI")
38 | public CLI create(
39 | final @TypeInfo("ceylon.language::String") @Name("name")@DocAnnotation$annotation$(description = "the name of the CLI (must not be null
)\n") ceylon.language.String name) {
40 | java.lang.String arg_0 = io.vertx.lang.ceylon.ToJava.String.safeConvert(name);
41 | CLI ret = io.vertx.ceylon.core.cli.CLI.TO_CEYLON.converter().safeConvert(io.vertx.core.cli.CLI.create(arg_0));
42 | return ret;
43 | }
44 |
45 | }
46 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/main/ceylon/io/vertx/ceylon/core/cli/commandLine_.java:
--------------------------------------------------------------------------------
1 | package io.vertx.ceylon.core.cli;
2 |
3 | import com.redhat.ceylon.compiler.java.metadata.Ceylon;
4 | import com.redhat.ceylon.compiler.java.metadata.TypeInfo;
5 | import com.redhat.ceylon.compiler.java.metadata.TypeParameter;
6 | import com.redhat.ceylon.compiler.java.metadata.TypeParameters;
7 | import com.redhat.ceylon.compiler.java.metadata.Variance;
8 | import com.redhat.ceylon.compiler.java.metadata.Ignore;
9 | import com.redhat.ceylon.compiler.java.metadata.Name;
10 | import com.redhat.ceylon.compiler.java.runtime.model.TypeDescriptor;
11 | import com.redhat.ceylon.compiler.java.runtime.model.ReifiedType;
12 | import ceylon.language.Callable;
13 | import ceylon.language.DocAnnotation$annotation$;
14 | import java.util.List;
15 |
16 | @Ceylon(major = 8)
17 | @Name("commandLine")
18 | @com.redhat.ceylon.compiler.java.metadata.Object
19 | public class commandLine_ implements ReifiedType {
20 |
21 | private static final commandLine_ instance = new commandLine_();
22 | public static final TypeDescriptor $TypeDescriptor$ = TypeDescriptor.klass(commandLine_.class);
23 |
24 | @Ignore
25 | public TypeDescriptor $getType$() {
26 | return $TypeDescriptor$;
27 | }
28 |
29 | @Ignore
30 | @TypeInfo("io.vertx.ceylon.core.cli::commandLine")
31 | public static commandLine_ get_() {
32 | return instance;
33 | }
34 |
35 |
36 | @DocAnnotation$annotation$(description = " Creates a command line object from the [CLI](../cli/CLI.type.html). This object is intended to be used by\n the parser to set the argument and option values.\n")
37 | @TypeInfo("io.vertx.ceylon.core.cli::CommandLine")
38 | public CommandLine create(
39 | final @TypeInfo("io.vertx.ceylon.core.cli::CLI") @Name("cli")@DocAnnotation$annotation$(description = "the CLI definition\n") CLI cli) {
40 | io.vertx.core.cli.CLI arg_0 = io.vertx.ceylon.core.cli.CLI.TO_JAVA.safeConvert(cli);
41 | CommandLine ret = io.vertx.ceylon.core.cli.CommandLine.TO_CEYLON.converter().safeConvert(io.vertx.core.cli.CommandLine.create(arg_0));
42 | return ret;
43 | }
44 |
45 | }
46 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/main/ceylon/io/vertx/ceylon/core/cli/package.ceylon:
--------------------------------------------------------------------------------
1 | shared package io.vertx.ceylon.core.cli;
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/main/ceylon/io/vertx/ceylon/core/datagram/package.ceylon:
--------------------------------------------------------------------------------
1 | shared package io.vertx.ceylon.core.datagram;
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/main/ceylon/io/vertx/ceylon/core/dns/package.ceylon:
--------------------------------------------------------------------------------
1 | shared package io.vertx.ceylon.core.dns;
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/main/ceylon/io/vertx/ceylon/core/eventbus/ReplyFailure.ceylon:
--------------------------------------------------------------------------------
1 | import io.vertx.lang.ceylon { Converter }
2 | import io.vertx.core.eventbus { ReplyFailure_=ReplyFailure }
3 |
4 | " Represents the type of reply failure\n"
5 | shared abstract class ReplyFailure(shared String name) of timeout | no_handlers | recipient_failure {
6 | }
7 |
8 | " The message send failed because no reply was received before the timeout time.\n"
9 | shared object timeout extends ReplyFailure("TIMEOUT") {}
10 | " The message send failed because no handlers were available to handle the message.\n"
11 | shared object no_handlers extends ReplyFailure("NO_HANDLERS") {}
12 | " The message send failed because the recipient actively sent back a failure (rejected the message)\n"
13 | shared object recipient_failure extends ReplyFailure("RECIPIENT_FAILURE") {}
14 |
15 | shared object replyFailure {
16 |
17 | shared String toString(ReplyFailure val) {
18 | switch (val)
19 | case(timeout) { return "TIMEOUT"; }
20 | case(no_handlers) { return "NO_HANDLERS"; }
21 | case(recipient_failure) { return "RECIPIENT_FAILURE"; }
22 | }
23 |
24 | shared ReplyFailure fromString(String val) {
25 | switch (val)
26 | case("TIMEOUT") { return timeout; }
27 | case("NO_HANDLERS") { return no_handlers; }
28 | case("RECIPIENT_FAILURE") { return recipient_failure; }
29 | else {
30 | throw Exception("Invalid ReplyFailure value ``val``");
31 | }
32 | }
33 |
34 | shared object toJava extends Converter() {
35 | shared actual ReplyFailure_ convert(ReplyFailure src) {
36 | switch (src)
37 | case(timeout) { return ReplyFailure_.\iTIMEOUT; }
38 | case(no_handlers) { return ReplyFailure_.\iNO_HANDLERS; }
39 | case(recipient_failure) { return ReplyFailure_.\iRECIPIENT_FAILURE; }
40 | }
41 | }
42 |
43 | shared object toCeylon extends Converter() {
44 | shared actual ReplyFailure convert(ReplyFailure_ src) {
45 | if (src == ReplyFailure_.\iTIMEOUT) {
46 | return timeout;
47 | }
48 | if (src == ReplyFailure_.\iNO_HANDLERS) {
49 | return no_handlers;
50 | }
51 | if (src == ReplyFailure_.\iRECIPIENT_FAILURE) {
52 | return recipient_failure;
53 | }
54 | throw Exception("Invalid enum value");
55 | }
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/main/ceylon/io/vertx/ceylon/core/eventbus/package.ceylon:
--------------------------------------------------------------------------------
1 | shared package io.vertx.ceylon.core.eventbus;
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/main/ceylon/io/vertx/ceylon/core/file/package.ceylon:
--------------------------------------------------------------------------------
1 | shared package io.vertx.ceylon.core.file;
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/main/ceylon/io/vertx/ceylon/core/http/ClientAuth.ceylon:
--------------------------------------------------------------------------------
1 | import io.vertx.lang.ceylon { Converter }
2 | import io.vertx.core.http { ClientAuth_=ClientAuth }
3 |
4 | " Configures the engine to require/request client authentication.\n \n Created by manishk on 10/2/2015.\n"
5 | shared abstract class ClientAuth(shared String name) of none | request | required {
6 | }
7 |
8 | " No client authentication is requested or required.\n"
9 | shared object none extends ClientAuth("NONE") {}
10 | " Accept authentication if presented by client. If this option is set and the client chooses\n not to provide authentication information about itself, the negotiations will continue.\n"
11 | shared object request extends ClientAuth("REQUEST") {}
12 | " Require client to present authentication, if not presented then negotiations will be declined.\n"
13 | shared object required extends ClientAuth("REQUIRED") {}
14 |
15 | shared object clientAuth {
16 |
17 | shared String toString(ClientAuth val) {
18 | switch (val)
19 | case(none) { return "NONE"; }
20 | case(request) { return "REQUEST"; }
21 | case(required) { return "REQUIRED"; }
22 | }
23 |
24 | shared ClientAuth fromString(String val) {
25 | switch (val)
26 | case("NONE") { return none; }
27 | case("REQUEST") { return request; }
28 | case("REQUIRED") { return required; }
29 | else {
30 | throw Exception("Invalid ClientAuth value ``val``");
31 | }
32 | }
33 |
34 | shared object toJava extends Converter() {
35 | shared actual ClientAuth_ convert(ClientAuth src) {
36 | switch (src)
37 | case(none) { return ClientAuth_.\iNONE; }
38 | case(request) { return ClientAuth_.\iREQUEST; }
39 | case(required) { return ClientAuth_.\iREQUIRED; }
40 | }
41 | }
42 |
43 | shared object toCeylon extends Converter() {
44 | shared actual ClientAuth convert(ClientAuth_ src) {
45 | if (src == ClientAuth_.\iNONE) {
46 | return none;
47 | }
48 | if (src == ClientAuth_.\iREQUEST) {
49 | return request;
50 | }
51 | if (src == ClientAuth_.\iREQUIRED) {
52 | return required;
53 | }
54 | throw Exception("Invalid enum value");
55 | }
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/main/ceylon/io/vertx/ceylon/core/http/GoAway.ceylon:
--------------------------------------------------------------------------------
1 | import ceylon.time.iso8601 {
2 | parseZoneDateTime
3 | }
4 | import ceylon.json {
5 | JsonObject=Object,
6 | JsonArray=Array,
7 | parse
8 | }
9 | import io.vertx.lang.ceylon {
10 | BaseDataObject,
11 | Converter,
12 | ToJava
13 | }
14 | import io.vertx.core.http {
15 | GoAway_=GoAway
16 | }
17 | import ceylon.collection {
18 | HashMap
19 | }
20 | import ceylon.time {
21 | Instant
22 | }
23 | import io.vertx.core.json {
24 | JsonObject_=JsonObject,
25 | JsonArray_=JsonArray
26 | }
27 | /* Generated from io.vertx.core.http.GoAway */
28 | " A frame.\n"
29 | shared class GoAway(
30 | ""
31 | shared Integer? errorCode = null,
32 | " Set the last stream id.\n"
33 | shared Integer? lastStreamId = null) satisfies BaseDataObject {
34 | shared actual default JsonObject toJson() {
35 | value json = JsonObject();
36 | if (exists errorCode) {
37 | json.put("errorCode", errorCode);
38 | }
39 | if (exists lastStreamId) {
40 | json.put("lastStreamId", lastStreamId);
41 | }
42 | return json;
43 | }
44 | }
45 |
46 | shared object goAway {
47 |
48 | shared GoAway fromJson(JsonObject json) {
49 | Integer? errorCode = json.getIntegerOrNull("errorCode");
50 | Integer? lastStreamId = json.getIntegerOrNull("lastStreamId");
51 | return GoAway {
52 | errorCode = errorCode;
53 | lastStreamId = lastStreamId;
54 | };
55 | }
56 |
57 | shared object toCeylon extends Converter() {
58 | shared actual GoAway convert(GoAway_ src) {
59 | value json = parse(src.toJson().string);
60 | assert(is JsonObject json);
61 | return fromJson(json);
62 | }
63 | }
64 |
65 | shared object toJava extends Converter() {
66 | shared actual GoAway_ convert(GoAway src) {
67 | // Todo : make optimized version without json
68 | value json = JsonObject_(src.toJson().string);
69 | value ret = GoAway_(json);
70 | return ret;
71 | }
72 | }
73 | shared JsonObject toJson(GoAway obj) => obj.toJson();
74 | }
75 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/main/ceylon/io/vertx/ceylon/core/http/HttpVersion.ceylon:
--------------------------------------------------------------------------------
1 | import io.vertx.lang.ceylon { Converter }
2 | import io.vertx.core.http { HttpVersion_=HttpVersion }
3 |
4 | " Represents the version of the HTTP protocol.\n"
5 | shared abstract class HttpVersion(shared String name) of http_1_0 | http_1_1 | http_2 {
6 | }
7 |
8 | shared object http_1_0 extends HttpVersion("HTTP_1_0") {}
9 | shared object http_1_1 extends HttpVersion("HTTP_1_1") {}
10 | shared object http_2 extends HttpVersion("HTTP_2") {}
11 |
12 | shared object httpVersion {
13 |
14 | shared String toString(HttpVersion val) {
15 | switch (val)
16 | case(http_1_0) { return "HTTP_1_0"; }
17 | case(http_1_1) { return "HTTP_1_1"; }
18 | case(http_2) { return "HTTP_2"; }
19 | }
20 |
21 | shared HttpVersion fromString(String val) {
22 | switch (val)
23 | case("HTTP_1_0") { return http_1_0; }
24 | case("HTTP_1_1") { return http_1_1; }
25 | case("HTTP_2") { return http_2; }
26 | else {
27 | throw Exception("Invalid HttpVersion value ``val``");
28 | }
29 | }
30 |
31 | shared object toJava extends Converter() {
32 | shared actual HttpVersion_ convert(HttpVersion src) {
33 | switch (src)
34 | case(http_1_0) { return HttpVersion_.\iHTTP_1_0; }
35 | case(http_1_1) { return HttpVersion_.\iHTTP_1_1; }
36 | case(http_2) { return HttpVersion_.\iHTTP_2; }
37 | }
38 | }
39 |
40 | shared object toCeylon extends Converter() {
41 | shared actual HttpVersion convert(HttpVersion_ src) {
42 | if (src == HttpVersion_.\iHTTP_1_0) {
43 | return http_1_0;
44 | }
45 | if (src == HttpVersion_.\iHTTP_1_1) {
46 | return http_1_1;
47 | }
48 | if (src == HttpVersion_.\iHTTP_2) {
49 | return http_2;
50 | }
51 | throw Exception("Invalid enum value");
52 | }
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/main/ceylon/io/vertx/ceylon/core/http/RequestOptions.ceylon:
--------------------------------------------------------------------------------
1 | import ceylon.time.iso8601 {
2 | parseZoneDateTime
3 | }
4 | import ceylon.json {
5 | JsonObject=Object,
6 | JsonArray=Array,
7 | parse
8 | }
9 | import io.vertx.lang.ceylon {
10 | BaseDataObject,
11 | Converter,
12 | ToJava
13 | }
14 | import io.vertx.core.http {
15 | RequestOptions_=RequestOptions
16 | }
17 | import ceylon.collection {
18 | HashMap
19 | }
20 | import ceylon.time {
21 | Instant
22 | }
23 | import io.vertx.core.json {
24 | JsonObject_=JsonObject,
25 | JsonArray_=JsonArray
26 | }
27 | /* Generated from io.vertx.core.http.RequestOptions */
28 | " Options describing how an [HttpClient](../http/HttpClient.type.html) will make connect to make a request.\n"
29 | shared class RequestOptions(
30 | " Set the host name to be used by the client request.\n"
31 | shared String? host = null,
32 | " Set the port to be used by the client request.\n"
33 | shared Integer? port = null,
34 | " Set whether SSL/TLS is enabled\n"
35 | shared Boolean? ssl = null,
36 | " Set the request relative URI\n"
37 | shared String? uri = null) satisfies BaseDataObject {
38 | shared actual default JsonObject toJson() {
39 | value json = JsonObject();
40 | if (exists host) {
41 | json.put("host", host);
42 | }
43 | if (exists port) {
44 | json.put("port", port);
45 | }
46 | if (exists ssl) {
47 | json.put("ssl", ssl);
48 | }
49 | if (exists uri) {
50 | json.put("uri", uri);
51 | }
52 | return json;
53 | }
54 | }
55 |
56 | shared object requestOptions {
57 |
58 | shared RequestOptions fromJson(JsonObject json) {
59 | String? host = json.getStringOrNull("host");
60 | Integer? port = json.getIntegerOrNull("port");
61 | Boolean? ssl = json.getBooleanOrNull("ssl");
62 | String? uri = json.getStringOrNull("uri");
63 | return RequestOptions {
64 | host = host;
65 | port = port;
66 | ssl = ssl;
67 | uri = uri;
68 | };
69 | }
70 |
71 | shared object toJava extends Converter() {
72 | shared actual RequestOptions_ convert(RequestOptions src) {
73 | // Todo : make optimized version without json
74 | value json = JsonObject_(src.toJson().string);
75 | value ret = RequestOptions_(json);
76 | return ret;
77 | }
78 | }
79 | shared JsonObject toJson(RequestOptions obj) => obj.toJson();
80 | }
81 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/main/ceylon/io/vertx/ceylon/core/http/WebsocketVersion.ceylon:
--------------------------------------------------------------------------------
1 | import io.vertx.lang.ceylon { Converter }
2 | import io.vertx.core.http { WebsocketVersion_=WebsocketVersion }
3 |
4 | " Represents the WebSocket version\n"
5 | shared abstract class WebsocketVersion(shared String name) of v00 | v07 | v08 | v13 {
6 | }
7 |
8 | shared object v00 extends WebsocketVersion("V00") {}
9 | shared object v07 extends WebsocketVersion("V07") {}
10 | shared object v08 extends WebsocketVersion("V08") {}
11 | shared object v13 extends WebsocketVersion("V13") {}
12 |
13 | shared object websocketVersion {
14 |
15 | shared String toString(WebsocketVersion val) {
16 | switch (val)
17 | case(v00) { return "V00"; }
18 | case(v07) { return "V07"; }
19 | case(v08) { return "V08"; }
20 | case(v13) { return "V13"; }
21 | }
22 |
23 | shared WebsocketVersion fromString(String val) {
24 | switch (val)
25 | case("V00") { return v00; }
26 | case("V07") { return v07; }
27 | case("V08") { return v08; }
28 | case("V13") { return v13; }
29 | else {
30 | throw Exception("Invalid WebsocketVersion value ``val``");
31 | }
32 | }
33 |
34 | shared object toJava extends Converter() {
35 | shared actual WebsocketVersion_ convert(WebsocketVersion src) {
36 | switch (src)
37 | case(v00) { return WebsocketVersion_.\iV00; }
38 | case(v07) { return WebsocketVersion_.\iV07; }
39 | case(v08) { return WebsocketVersion_.\iV08; }
40 | case(v13) { return WebsocketVersion_.\iV13; }
41 | }
42 | }
43 |
44 | shared object toCeylon extends Converter() {
45 | shared actual WebsocketVersion convert(WebsocketVersion_ src) {
46 | if (src == WebsocketVersion_.\iV00) {
47 | return v00;
48 | }
49 | if (src == WebsocketVersion_.\iV07) {
50 | return v07;
51 | }
52 | if (src == WebsocketVersion_.\iV08) {
53 | return v08;
54 | }
55 | if (src == WebsocketVersion_.\iV13) {
56 | return v13;
57 | }
58 | throw Exception("Invalid enum value");
59 | }
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/main/ceylon/io/vertx/ceylon/core/http/package.ceylon:
--------------------------------------------------------------------------------
1 | shared package io.vertx.ceylon.core.http;
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/main/ceylon/io/vertx/ceylon/core/impl/isVerticle.ceylon:
--------------------------------------------------------------------------------
1 | import ceylon.language.meta.declaration { OpenType, OpenClassType }
2 | import io.vertx.ceylon.core { Verticle }
3 |
4 | OpenType verticleDecl = `class Verticle`.openType;
5 | Boolean isVerticle(OpenType classDecl) {
6 | if (is OpenClassType classDecl) {
7 | if (exists ext = classDecl.extendedType) {
8 | if (ext == verticleDecl) {
9 | return true;
10 | } else {
11 | return isVerticle(ext);
12 | }
13 | }
14 | }
15 | return false;
16 | }
17 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/main/ceylon/io/vertx/ceylon/core/impl/package.ceylon:
--------------------------------------------------------------------------------
1 | shared package io.vertx.ceylon.core.impl;
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/main/ceylon/io/vertx/ceylon/core/impl/resolveVerticle.ceylon:
--------------------------------------------------------------------------------
1 | import ceylon.language.meta.declaration { ClassDeclaration }
2 | import java.util.concurrent { Callable }
3 | import io.vertx.ceylon.core { Verticle }
4 | import io.vertx.core { Verticle_=Verticle }
5 |
6 | Callable? resolveVerticle(ClassDeclaration classDecl) {
7 | if (isVerticle(classDecl.openType)) {
8 | object factory satisfies Callable {
9 | shared actual Verticle_ call() {
10 | value instance = classDecl.instantiate();
11 | assert (is Verticle instance);
12 | return instance.nativeVerticle;
13 | }
14 | }
15 | return factory;
16 | } else {
17 | return null;
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/main/ceylon/io/vertx/ceylon/core/impl/resolveVerticles.ceylon:
--------------------------------------------------------------------------------
1 | import ceylon.language.meta { modules }
2 | import ceylon.language.meta.declaration { Module, ClassDeclaration }
3 | import java.util { Map_=Map, LinkedHashMap_=LinkedHashMap }
4 | import java.util.concurrent { Callable_=Callable }
5 | import java.lang { String_=String }
6 | import io.vertx.ceylon.core { Verticle }
7 | import io.vertx.core { Verticle_=Verticle }
8 |
9 | "Find the verticles for the specified module and return a list of verticle factories. This method is called
10 | by the Vert.x module to discover the existing Verticles and is somewhat reserved for internal use."
11 | shared Map_> resolveVerticles(
12 | "The name of the module to introspect"
13 | String_ moduleName,
14 | "The optional verticle name to return"
15 | String_? verticleName) {
16 | value verticles = LinkedHashMap_>();
17 | value mods = modules.list.filter((Module elem) => moduleName == String_(elem.name));
18 | for (mod in mods) {
19 | for (pkg in mod.members) {
20 | {ClassDeclaration*} classDecls;
21 | if (exists verticleName) {
22 | classDecls = pkg.members().filter((ClassDeclaration classDecl) => classDecl.qualifiedName == verticleName.string);
23 | } else {
24 | classDecls = pkg.members();
25 | }
26 | for (classDecl in classDecls) {
27 | value verticle = resolveVerticle(classDecl);
28 | if (exists verticle) {
29 | verticles.put(String_(classDecl.qualifiedName), verticle);
30 | }
31 | }
32 | }
33 | }
34 | return verticles;
35 | }
36 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/main/ceylon/io/vertx/ceylon/core/metrics/MetricsOptions.ceylon:
--------------------------------------------------------------------------------
1 | import ceylon.time.iso8601 {
2 | parseZoneDateTime
3 | }
4 | import ceylon.json {
5 | JsonObject=Object,
6 | JsonArray=Array,
7 | parse
8 | }
9 | import io.vertx.lang.ceylon {
10 | BaseDataObject,
11 | Converter,
12 | ToJava
13 | }
14 | import io.vertx.core.metrics {
15 | MetricsOptions_=MetricsOptions
16 | }
17 | import ceylon.collection {
18 | HashMap
19 | }
20 | import ceylon.time {
21 | Instant
22 | }
23 | import io.vertx.core.json {
24 | JsonObject_=JsonObject,
25 | JsonArray_=JsonArray
26 | }
27 | /* Generated from io.vertx.core.metrics.MetricsOptions */
28 | " Vert.x metrics base configuration, this class can be extended by provider implementations to configure\n those specific implementations.\n"
29 | shared class MetricsOptions(
30 | " Set whether metrics will be enabled on the Vert.x instance.\n"
31 | shared Boolean? enabled = null) satisfies BaseDataObject {
32 | shared actual default JsonObject toJson() {
33 | value json = JsonObject();
34 | if (exists enabled) {
35 | json.put("enabled", enabled);
36 | }
37 | return json;
38 | }
39 | }
40 |
41 | shared object metricsOptions {
42 |
43 | shared MetricsOptions fromJson(JsonObject json) {
44 | Boolean? enabled = json.getBooleanOrNull("enabled");
45 | return MetricsOptions {
46 | enabled = enabled;
47 | };
48 | }
49 |
50 | shared object toCeylon extends Converter() {
51 | shared actual MetricsOptions convert(MetricsOptions_ src) {
52 | value json = parse(src.toJson().string);
53 | assert(is JsonObject json);
54 | return fromJson(json);
55 | }
56 | }
57 |
58 | shared object toJava extends Converter() {
59 | shared actual MetricsOptions_ convert(MetricsOptions src) {
60 | // Todo : make optimized version without json
61 | value json = JsonObject_(src.toJson().string);
62 | value ret = MetricsOptions_(json);
63 | return ret;
64 | }
65 | }
66 | shared JsonObject toJson(MetricsOptions obj) => obj.toJson();
67 | }
68 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/main/ceylon/io/vertx/ceylon/core/metrics/package.ceylon:
--------------------------------------------------------------------------------
1 | shared package io.vertx.ceylon.core.metrics;
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/main/ceylon/io/vertx/ceylon/core/module.ceylon:
--------------------------------------------------------------------------------
1 | native("jvm")
2 | module io.vertx.ceylon.core "${project.version}" {
3 | native("jvm") import java.base "7";
4 | shared import ceylon.json "1.3.3";
5 | shared import ceylon.time "1.3.3";
6 | shared import io.vertx.lang.ceylon "${project.version}";
7 | shared import "io.vertx.vertx-core" "${project.version}"; // io.vertx.ceylon.core
8 | }
9 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/main/ceylon/io/vertx/ceylon/core/multiMap_.java:
--------------------------------------------------------------------------------
1 | package io.vertx.ceylon.core;
2 |
3 | import com.redhat.ceylon.compiler.java.metadata.Ceylon;
4 | import com.redhat.ceylon.compiler.java.metadata.TypeInfo;
5 | import com.redhat.ceylon.compiler.java.metadata.TypeParameter;
6 | import com.redhat.ceylon.compiler.java.metadata.TypeParameters;
7 | import com.redhat.ceylon.compiler.java.metadata.Variance;
8 | import com.redhat.ceylon.compiler.java.metadata.Ignore;
9 | import com.redhat.ceylon.compiler.java.metadata.Name;
10 | import com.redhat.ceylon.compiler.java.runtime.model.TypeDescriptor;
11 | import com.redhat.ceylon.compiler.java.runtime.model.ReifiedType;
12 | import ceylon.language.Callable;
13 | import ceylon.language.DocAnnotation$annotation$;
14 | import java.util.List;
15 | import java.util.Map.Entry;
16 | import java.util.Set;
17 |
18 | @Ceylon(major = 8)
19 | @Name("multiMap")
20 | @com.redhat.ceylon.compiler.java.metadata.Object
21 | public class multiMap_ implements ReifiedType {
22 |
23 | private static final multiMap_ instance = new multiMap_();
24 | public static final TypeDescriptor $TypeDescriptor$ = TypeDescriptor.klass(multiMap_.class);
25 |
26 | @Ignore
27 | public TypeDescriptor $getType$() {
28 | return $TypeDescriptor$;
29 | }
30 |
31 | @Ignore
32 | @TypeInfo("io.vertx.ceylon.core::multiMap")
33 | public static multiMap_ get_() {
34 | return instance;
35 | }
36 |
37 |
38 | @DocAnnotation$annotation$(description = " Create a multi-map implementation with case insensitive keys, for instance it can be used to hold some HTTP headers.\n")
39 | @TypeInfo("io.vertx.ceylon.core::MultiMap")
40 | public MultiMap caseInsensitiveMultiMap() {
41 | MultiMap ret = io.vertx.ceylon.core.MultiMap.TO_CEYLON.converter().safeConvert(io.vertx.core.MultiMap.caseInsensitiveMultiMap());
42 | return ret;
43 | }
44 |
45 | }
46 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/main/ceylon/io/vertx/ceylon/core/net/JdkSSLEngineOptions.ceylon:
--------------------------------------------------------------------------------
1 | import ceylon.time.iso8601 {
2 | parseZoneDateTime
3 | }
4 | import ceylon.json {
5 | JsonObject=Object,
6 | JsonArray=Array,
7 | parse
8 | }
9 | import io.vertx.lang.ceylon {
10 | BaseDataObject,
11 | Converter,
12 | ToJava
13 | }
14 | import io.vertx.core.net {
15 | JdkSSLEngineOptions_=JdkSSLEngineOptions
16 | }
17 | import ceylon.collection {
18 | HashMap
19 | }
20 | import ceylon.time {
21 | Instant
22 | }
23 | import io.vertx.core.json {
24 | JsonObject_=JsonObject,
25 | JsonArray_=JsonArray
26 | }
27 | /* Generated from io.vertx.core.net.JdkSSLEngineOptions */
28 | " Configures a [TCPSSLOptions](../net/TCPSSLOptions.type.html) to use the JDK ssl engine implementation.\n"
29 | shared class JdkSSLEngineOptions() satisfies BaseDataObject {
30 | shared actual default JsonObject toJson() {
31 | value json = JsonObject();
32 | return json;
33 | }
34 | }
35 |
36 | shared object jdkSSLEngineOptions {
37 |
38 | shared JdkSSLEngineOptions fromJson(JsonObject json) {
39 | return JdkSSLEngineOptions {
40 | };
41 | }
42 |
43 | shared object toCeylon extends Converter() {
44 | shared actual JdkSSLEngineOptions convert(JdkSSLEngineOptions_ src) {
45 | value json = parse(src.toJson().string);
46 | assert(is JsonObject json);
47 | return fromJson(json);
48 | }
49 | }
50 |
51 | shared object toJava extends Converter() {
52 | shared actual JdkSSLEngineOptions_ convert(JdkSSLEngineOptions src) {
53 | // Todo : make optimized version without json
54 | value json = JsonObject_(src.toJson().string);
55 | value ret = JdkSSLEngineOptions_(json);
56 | return ret;
57 | }
58 | }
59 | shared JsonObject toJson(JdkSSLEngineOptions obj) => obj.toJson();
60 | }
61 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/main/ceylon/io/vertx/ceylon/core/net/OpenSSLEngineOptions.ceylon:
--------------------------------------------------------------------------------
1 | import ceylon.time.iso8601 {
2 | parseZoneDateTime
3 | }
4 | import ceylon.json {
5 | JsonObject=Object,
6 | JsonArray=Array,
7 | parse
8 | }
9 | import io.vertx.lang.ceylon {
10 | BaseDataObject,
11 | Converter,
12 | ToJava
13 | }
14 | import io.vertx.core.net {
15 | OpenSSLEngineOptions_=OpenSSLEngineOptions
16 | }
17 | import ceylon.collection {
18 | HashMap
19 | }
20 | import ceylon.time {
21 | Instant
22 | }
23 | import io.vertx.core.json {
24 | JsonObject_=JsonObject,
25 | JsonArray_=JsonArray
26 | }
27 | /* Generated from io.vertx.core.net.OpenSSLEngineOptions */
28 | " Configures a [TCPSSLOptions](../net/TCPSSLOptions.type.html) to use OpenSsl.\n"
29 | shared class OpenSSLEngineOptions(
30 | " Set whether session cache is enabled in open SSL session server context\n"
31 | shared Boolean? sessionCacheEnabled = null) satisfies BaseDataObject {
32 | shared actual default JsonObject toJson() {
33 | value json = JsonObject();
34 | if (exists sessionCacheEnabled) {
35 | json.put("sessionCacheEnabled", sessionCacheEnabled);
36 | }
37 | return json;
38 | }
39 | }
40 |
41 | shared object openSSLEngineOptions {
42 |
43 | shared OpenSSLEngineOptions fromJson(JsonObject json) {
44 | Boolean? sessionCacheEnabled = json.getBooleanOrNull("sessionCacheEnabled");
45 | return OpenSSLEngineOptions {
46 | sessionCacheEnabled = sessionCacheEnabled;
47 | };
48 | }
49 |
50 | shared object toCeylon extends Converter() {
51 | shared actual OpenSSLEngineOptions convert(OpenSSLEngineOptions_ src) {
52 | value json = parse(src.toJson().string);
53 | assert(is JsonObject json);
54 | return fromJson(json);
55 | }
56 | }
57 |
58 | shared object toJava extends Converter() {
59 | shared actual OpenSSLEngineOptions_ convert(OpenSSLEngineOptions src) {
60 | // Todo : make optimized version without json
61 | value json = JsonObject_(src.toJson().string);
62 | value ret = OpenSSLEngineOptions_(json);
63 | return ret;
64 | }
65 | }
66 | shared JsonObject toJson(OpenSSLEngineOptions obj) => obj.toJson();
67 | }
68 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/main/ceylon/io/vertx/ceylon/core/net/ProxyType.ceylon:
--------------------------------------------------------------------------------
1 | import io.vertx.lang.ceylon { Converter }
2 | import io.vertx.core.net { ProxyType_=ProxyType }
3 |
4 | " The type of a TCP proxy server.\n"
5 | shared abstract class ProxyType(shared String name) of http | socks4 | socks5 {
6 | }
7 |
8 | " HTTP CONNECT ssl proxy\n"
9 | shared object http extends ProxyType("HTTP") {}
10 | " SOCKS4/4a tcp proxy\n"
11 | shared object socks4 extends ProxyType("SOCKS4") {}
12 | " SOCSK5 tcp proxy\n"
13 | shared object socks5 extends ProxyType("SOCKS5") {}
14 |
15 | shared object proxyType {
16 |
17 | shared String toString(ProxyType val) {
18 | switch (val)
19 | case(http) { return "HTTP"; }
20 | case(socks4) { return "SOCKS4"; }
21 | case(socks5) { return "SOCKS5"; }
22 | }
23 |
24 | shared ProxyType fromString(String val) {
25 | switch (val)
26 | case("HTTP") { return http; }
27 | case("SOCKS4") { return socks4; }
28 | case("SOCKS5") { return socks5; }
29 | else {
30 | throw Exception("Invalid ProxyType value ``val``");
31 | }
32 | }
33 |
34 | shared object toJava extends Converter() {
35 | shared actual ProxyType_ convert(ProxyType src) {
36 | switch (src)
37 | case(http) { return ProxyType_.\iHTTP; }
38 | case(socks4) { return ProxyType_.\iSOCKS4; }
39 | case(socks5) { return ProxyType_.\iSOCKS5; }
40 | }
41 | }
42 |
43 | shared object toCeylon extends Converter() {
44 | shared actual ProxyType convert(ProxyType_ src) {
45 | if (src == ProxyType_.\iHTTP) {
46 | return http;
47 | }
48 | if (src == ProxyType_.\iSOCKS4) {
49 | return socks4;
50 | }
51 | if (src == ProxyType_.\iSOCKS5) {
52 | return socks5;
53 | }
54 | throw Exception("Invalid enum value");
55 | }
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/main/ceylon/io/vertx/ceylon/core/net/package.ceylon:
--------------------------------------------------------------------------------
1 | shared package io.vertx.ceylon.core.net;
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/main/ceylon/io/vertx/ceylon/core/net/selfSignedCertificate_.java:
--------------------------------------------------------------------------------
1 | package io.vertx.ceylon.core.net;
2 |
3 | import com.redhat.ceylon.compiler.java.metadata.Ceylon;
4 | import com.redhat.ceylon.compiler.java.metadata.TypeInfo;
5 | import com.redhat.ceylon.compiler.java.metadata.TypeParameter;
6 | import com.redhat.ceylon.compiler.java.metadata.TypeParameters;
7 | import com.redhat.ceylon.compiler.java.metadata.Variance;
8 | import com.redhat.ceylon.compiler.java.metadata.Ignore;
9 | import com.redhat.ceylon.compiler.java.metadata.Name;
10 | import com.redhat.ceylon.compiler.java.runtime.model.TypeDescriptor;
11 | import com.redhat.ceylon.compiler.java.runtime.model.ReifiedType;
12 | import ceylon.language.Callable;
13 | import ceylon.language.DocAnnotation$annotation$;
14 |
15 | @Ceylon(major = 8)
16 | @Name("selfSignedCertificate")
17 | @com.redhat.ceylon.compiler.java.metadata.Object
18 | public class selfSignedCertificate_ implements ReifiedType {
19 |
20 | private static final selfSignedCertificate_ instance = new selfSignedCertificate_();
21 | public static final TypeDescriptor $TypeDescriptor$ = TypeDescriptor.klass(selfSignedCertificate_.class);
22 |
23 | @Ignore
24 | public TypeDescriptor $getType$() {
25 | return $TypeDescriptor$;
26 | }
27 |
28 | @Ignore
29 | @TypeInfo("io.vertx.ceylon.core.net::selfSignedCertificate")
30 | public static selfSignedCertificate_ get_() {
31 | return instance;
32 | }
33 |
34 |
35 | @DocAnnotation$annotation$(description = " Create a new SelfSignedCertificate
instance.\n")
36 | @TypeInfo("io.vertx.ceylon.core.net::SelfSignedCertificate")
37 | public SelfSignedCertificate create() {
38 | SelfSignedCertificate ret = io.vertx.ceylon.core.net.SelfSignedCertificate.TO_CEYLON.converter().safeConvert(io.vertx.core.net.SelfSignedCertificate.create());
39 | return ret;
40 | }
41 |
42 | @DocAnnotation$annotation$(description = " Create a new SelfSignedCertificate
instance with a fully-qualified domain name,\n")
43 | @TypeInfo("io.vertx.ceylon.core.net::SelfSignedCertificate")
44 | public SelfSignedCertificate create(
45 | final @TypeInfo("ceylon.language::String") @Name("fqdn")@DocAnnotation$annotation$(description = "a fully qualified domain name.\n") ceylon.language.String fqdn) {
46 | java.lang.String arg_0 = io.vertx.lang.ceylon.ToJava.String.safeConvert(fqdn);
47 | SelfSignedCertificate ret = io.vertx.ceylon.core.net.SelfSignedCertificate.TO_CEYLON.converter().safeConvert(io.vertx.core.net.SelfSignedCertificate.create(arg_0));
48 | return ret;
49 | }
50 |
51 | }
52 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/main/ceylon/io/vertx/ceylon/core/package.ceylon:
--------------------------------------------------------------------------------
1 | shared package io.vertx.ceylon.core;
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/main/ceylon/io/vertx/ceylon/core/parsetools/jsonParser_.java:
--------------------------------------------------------------------------------
1 | package io.vertx.ceylon.core.parsetools;
2 |
3 | import com.redhat.ceylon.compiler.java.metadata.Ceylon;
4 | import com.redhat.ceylon.compiler.java.metadata.TypeInfo;
5 | import com.redhat.ceylon.compiler.java.metadata.TypeParameter;
6 | import com.redhat.ceylon.compiler.java.metadata.TypeParameters;
7 | import com.redhat.ceylon.compiler.java.metadata.Variance;
8 | import com.redhat.ceylon.compiler.java.metadata.Ignore;
9 | import com.redhat.ceylon.compiler.java.metadata.Name;
10 | import com.redhat.ceylon.compiler.java.runtime.model.TypeDescriptor;
11 | import com.redhat.ceylon.compiler.java.runtime.model.ReifiedType;
12 | import ceylon.language.Callable;
13 | import ceylon.language.DocAnnotation$annotation$;
14 | import io.vertx.ceylon.core.buffer.Buffer;
15 | import io.vertx.ceylon.core.streams.ReadStream;
16 | import io.vertx.core.Handler;
17 |
18 | @Ceylon(major = 8)
19 | @Name("jsonParser")
20 | @com.redhat.ceylon.compiler.java.metadata.Object
21 | public class jsonParser_ implements ReifiedType {
22 |
23 | private static final jsonParser_ instance = new jsonParser_();
24 | public static final TypeDescriptor $TypeDescriptor$ = TypeDescriptor.klass(jsonParser_.class);
25 |
26 | @Ignore
27 | public TypeDescriptor $getType$() {
28 | return $TypeDescriptor$;
29 | }
30 |
31 | @Ignore
32 | @TypeInfo("io.vertx.ceylon.core.parsetools::jsonParser")
33 | public static jsonParser_ get_() {
34 | return instance;
35 | }
36 |
37 |
38 | @DocAnnotation$annotation$(description = " Create a new JsonParser
instance.\n")
39 | @TypeInfo("io.vertx.ceylon.core.parsetools::JsonParser")
40 | public JsonParser newParser() {
41 | JsonParser ret = io.vertx.ceylon.core.parsetools.JsonParser.TO_CEYLON.converter().safeConvert(io.vertx.core.parsetools.JsonParser.newParser());
42 | return ret;
43 | }
44 |
45 | @DocAnnotation$annotation$(description = " Create a new JsonParser
instance.\n")
46 | @TypeInfo("io.vertx.ceylon.core.parsetools::JsonParser")
47 | public JsonParser newParser(
48 | final @TypeInfo("io.vertx.ceylon.core.streams::ReadStream") @Name("stream") ReadStream stream) {
49 | io.vertx.core.streams.ReadStream arg_0 = io.vertx.ceylon.core.streams.ReadStream.TO_JAVA.safeConvert(stream);
50 | JsonParser ret = io.vertx.ceylon.core.parsetools.JsonParser.TO_CEYLON.converter().safeConvert(io.vertx.core.parsetools.JsonParser.newParser(arg_0));
51 | return ret;
52 | }
53 |
54 | }
55 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/main/ceylon/io/vertx/ceylon/core/parsetools/package.ceylon:
--------------------------------------------------------------------------------
1 | shared package io.vertx.ceylon.core.parsetools;
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/main/ceylon/io/vertx/ceylon/core/shareddata/package.ceylon:
--------------------------------------------------------------------------------
1 | shared package io.vertx.ceylon.core.shareddata;
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/main/ceylon/io/vertx/ceylon/core/streams/package.ceylon:
--------------------------------------------------------------------------------
1 | shared package io.vertx.ceylon.core.streams;
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/main/ceylon/io/vertx/lang/ceylon/AsyncResultHandlerCallable.java:
--------------------------------------------------------------------------------
1 | package io.vertx.lang.ceylon;
2 |
3 | import ceylon.language.Anything;
4 | import com.redhat.ceylon.compiler.java.language.AbstractCallable;
5 | import io.vertx.core.AsyncResult;
6 | import io.vertx.core.Handler;
7 |
8 | public class AsyncResultHandlerCallable extends AbstractCallable {
9 |
10 | private final Converter converter;
11 | private final Handler handler;
12 |
13 | public AsyncResultHandlerCallable(Converter converter, Handler handler) {
14 | super(Anything.$TypeDescriptor$, Anything.$TypeDescriptor$, "whatever", (short) 0);
15 | this.converter = converter;
16 | this.handler = handler;
17 | }
18 |
19 | public Object $call$(java.lang.Object arg0) {
20 | if (arg0 instanceof Throwable) {
21 | handler.handle(new FailedResult((Throwable)arg0));
22 | } else {
23 | Object obj = converter.safeConvert(arg0);
24 | handler.handle(new SucceededResult(obj));
25 | }
26 | return null;
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/main/ceylon/io/vertx/lang/ceylon/BaseDataObject.ceylon:
--------------------------------------------------------------------------------
1 | import ceylon.json { JsonObject=Object }
2 |
3 | shared interface BaseDataObject {
4 | shared formal JsonObject toJson();
5 | }
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/main/ceylon/io/vertx/lang/ceylon/CallableAsyncResultHandler.java:
--------------------------------------------------------------------------------
1 | package io.vertx.lang.ceylon;
2 |
3 | import io.vertx.core.Handler;
4 | import io.vertx.core.AsyncResult;
5 | import ceylon.language.Callable;
6 | import ceylon.language.Throwable;
7 | import ceylon.language.Exception;
8 |
9 | public abstract class CallableAsyncResultHandler implements Handler> {
10 |
11 | private final Callable> callback;
12 |
13 | public CallableAsyncResultHandler(Callable> callback) {
14 | this.callback = callback;
15 | }
16 |
17 | public void handle(AsyncResult ar) {
18 | if (ar.succeeded()) {
19 | Object result = toCeylon(ar.result());
20 | callback.$call$(result);
21 | } else {
22 | callback.$call$(ar.cause());
23 | }
24 | }
25 |
26 | public abstract Object toCeylon(T t);
27 |
28 | }
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/main/ceylon/io/vertx/lang/ceylon/Converter.java:
--------------------------------------------------------------------------------
1 | package io.vertx.lang.ceylon;
2 |
3 | public abstract class Converter {
4 |
5 | public D safeConvert(S src) {
6 | if (src != null) {
7 | return convert(src);
8 | } else {
9 | return null;
10 | }
11 | }
12 |
13 | public abstract D convert(S src);
14 |
15 | }
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/main/ceylon/io/vertx/lang/ceylon/ConverterFactory.java:
--------------------------------------------------------------------------------
1 | package io.vertx.lang.ceylon;
2 |
3 | import com.redhat.ceylon.compiler.java.runtime.model.TypeDescriptor;
4 |
5 | public interface ConverterFactory {
6 |
7 | Converter converter(TypeDescriptor... descriptors);
8 |
9 | }
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/main/ceylon/io/vertx/lang/ceylon/FailedResult.java:
--------------------------------------------------------------------------------
1 | package io.vertx.lang.ceylon;
2 |
3 | import io.vertx.core.AsyncResult;
4 |
5 | public class FailedResult implements AsyncResult {
6 |
7 | private final Throwable cause;
8 |
9 | public FailedResult(Throwable cause) {
10 | this.cause = cause;
11 | }
12 |
13 | @Override
14 | public T result() {
15 | return null;
16 | }
17 |
18 | @Override
19 | public Throwable cause() {
20 | return cause;
21 | }
22 |
23 | @Override
24 | public boolean succeeded() {
25 | return false;
26 | }
27 |
28 | @Override
29 | public boolean failed() {
30 | return true;
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/main/ceylon/io/vertx/lang/ceylon/HandlerCallable.java:
--------------------------------------------------------------------------------
1 | package io.vertx.lang.ceylon;
2 |
3 | import ceylon.language.Anything;
4 | import com.redhat.ceylon.compiler.java.language.AbstractCallable;
5 | import io.vertx.core.AsyncResult;
6 | import io.vertx.core.Handler;
7 |
8 | public class HandlerCallable extends AbstractCallable {
9 |
10 | private final Converter converter;
11 | private final Handler handler;
12 |
13 | public HandlerCallable(Converter converter, Handler handler) {
14 | super(Anything.$TypeDescriptor$, Anything.$TypeDescriptor$, "whatever", (short) 0);
15 | this.converter = converter;
16 | this.handler = handler;
17 | }
18 |
19 | public Object $call$(java.lang.Object arg0) {
20 | Object obj = converter.safeConvert(arg0);
21 | handler.handle(obj);
22 | return null;
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/main/ceylon/io/vertx/lang/ceylon/SucceededResult.java:
--------------------------------------------------------------------------------
1 | package io.vertx.lang.ceylon;
2 |
3 | import io.vertx.core.AsyncResult;
4 |
5 | public class SucceededResult implements AsyncResult {
6 |
7 | private final T result;
8 |
9 | public SucceededResult(T result) {
10 | this.result = result;
11 | }
12 |
13 | @Override
14 | public T result() {
15 | return result;
16 | }
17 |
18 | @Override
19 | public Throwable cause() {
20 | return null;
21 | }
22 |
23 | @Override
24 | public boolean succeeded() {
25 | return true;
26 | }
27 |
28 | @Override
29 | public boolean failed() {
30 | return false;
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/main/ceylon/io/vertx/lang/ceylon/module.ceylon:
--------------------------------------------------------------------------------
1 | module io.vertx.lang.ceylon "${project.version}" {
2 | shared import "java.base" "7";
3 | shared import "ceylon.json" "1.3.3";
4 | shared import "ceylon.time" "1.3.3";
5 | shared import "io.vertx.vertx-core" "${project.version}";
6 | shared import "com.redhat.ceylon.compiler.java" "1.3.3";
7 | shared import "com.redhat.ceylon.tool.provider" "1.3.3";
8 | }
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/main/ceylon/io/vertx/lang/ceylon/package.ceylon:
--------------------------------------------------------------------------------
1 | shared package io.vertx.lang.ceylon;
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/main/docoverride/docoverride/buffer/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2014 Red Hat, Inc.
3 | *
4 | * All rights reserved. This program and the accompanying materials
5 | * are made available under the terms of the Eclipse Public License v1.0
6 | * and Apache License v2.0 which accompanies this distribution.
7 | *
8 | * The Eclipse Public License is available at
9 | * http://www.eclipse.org/legal/epl-v10.html
10 | *
11 | * The Apache License v2.0 is available at
12 | * http://www.opensource.org/licenses/apache2.0.php
13 | *
14 | * You may elect to redistribute this code under either of these licenses.
15 | */
16 |
17 | /**
18 | */
19 | @Document(fileName = "override/buffer_from_bytes.adoc")
20 | package docoverride.buffer;
21 |
22 | import io.vertx.docgen.Document;
23 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/main/docoverride/docoverride/dependencies/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2014 Red Hat, Inc.
3 | *
4 | * All rights reserved. This program and the accompanying materials
5 | * are made available under the terms of the Eclipse Public License v1.0
6 | * and Apache License v2.0 which accompanies this distribution.
7 | *
8 | * The Eclipse Public License is available at
9 | * http://www.eclipse.org/legal/epl-v10.html
10 | *
11 | * The Apache License v2.0 is available at
12 | * http://www.opensource.org/licenses/apache2.0.php
13 | *
14 | * You may elect to redistribute this code under either of these licenses.
15 | */
16 |
17 | /**
18 | * If you are embedding Vert.x in Ceylon you should import Vert.x modules of your Ceylon module:
19 | *
20 | * [source,xml,subs="+attributes"]
21 | * ----
22 | * native("jvm")
23 | * module my.module "1.0.0" {
24 | * shared import io.vertx.ceylon.core "${maven.version}";
25 | * }
26 | * ----
27 | *
28 | * The following stack of modules is supported in ${maven.version}:
29 | *
30 | * - `io.vertx.ceylon.core`
31 | * - `io.vertx.ceylon.jdbc`
32 | * - `io.vertx.ceylon.sql`
33 | * - `io.vertx.ceylon.web`
34 | * - `io.vertx.ceylon.auth.common`
35 | * - `io.vertx.ceylon.auth.jdbc`
36 | * - `io.vertx.ceylon.auth.jwt`
37 | * - `io.vertx.ceylon.auth.oauth2`
38 | * - `io.vertx.ceylon.auth.shiro`
39 | */
40 | @Document(fileName = "override/dependencies.adoc")
41 | package docoverride.dependencies;
42 |
43 | import io.vertx.docgen.Document;
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/main/docoverride/docoverride/dns/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2014 Red Hat, Inc.
3 | *
4 | * All rights reserved. This program and the accompanying materials
5 | * are made available under the terms of the Eclipse Public License v1.0
6 | * and Apache License v2.0 which accompanies this distribution.
7 | *
8 | * The Eclipse Public License is available at
9 | * http://www.eclipse.org/legal/epl-v10.html
10 | *
11 | * The Apache License v2.0 is available at
12 | * http://www.opensource.org/licenses/apache2.0.php
13 | *
14 | * You may elect to redistribute this code under either of these licenses.
15 | */
16 |
17 | /**
18 | */
19 | @Document(fileName = "override/dns.adoc")
20 | package docoverride.dns;
21 |
22 | import io.vertx.docgen.Document;
23 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/main/docoverride/docoverride/eventbus/headers/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2011-2013 The original author or authors
3 | * ------------------------------------------------------
4 | * All rights reserved. This program and the accompanying materials
5 | * are made available under the terms of the Eclipse Public License v1.0
6 | * and Apache License v2.0 which accompanies this distribution.
7 | *
8 | * The Eclipse Public License is available at
9 | * http://www.eclipse.org/legal/epl-v10.html
10 | *
11 | * The Apache License v2.0 is available at
12 | * http://www.opensource.org/licenses/apache2.0.php
13 | *
14 | * You may elect to redistribute this code under either of these licenses.
15 | */
16 | /**
17 | *
18 | * Message delivery headers are available exclusively with the Java api.
19 | */
20 | @Document(fileName = "override/eventbus_headers.adoc")
21 | package docoverride.eventbus.headers;
22 |
23 | import io.vertx.docgen.Document;
24 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/main/docoverride/docoverride/eventbus/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2014 Red Hat, Inc.
3 | *
4 | * All rights reserved. This program and the accompanying materials
5 | * are made available under the terms of the Eclipse Public License v1.0
6 | * and Apache License v2.0 which accompanies this distribution.
7 | *
8 | * The Eclipse Public License is available at
9 | * http://www.eclipse.org/legal/epl-v10.html
10 | *
11 | * The Apache License v2.0 is available at
12 | * http://www.opensource.org/licenses/apache2.0.php
13 | *
14 | * You may elect to redistribute this code under either of these licenses.
15 | */
16 |
17 | /**
18 | * ==== Message Codecs
19 | *
20 | * Message codecs are available exclusively with the Java api.
21 | */
22 | @Document(fileName = "override/eventbus.adoc")
23 | package docoverride.eventbus;
24 |
25 | import io.vertx.docgen.Document;
26 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/main/docoverride/docoverride/json/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2014 Red Hat, Inc.
3 | *
4 | * All rights reserved. This program and the accompanying materials
5 | * are made available under the terms of the Eclipse Public License v1.0
6 | * and Apache License v2.0 which accompanies this distribution.
7 | *
8 | * The Eclipse Public License is available at
9 | * http://www.eclipse.org/legal/epl-v10.html
10 | *
11 | * The Apache License v2.0 is available at
12 | * http://www.opensource.org/licenses/apache2.0.php
13 | *
14 | * You may elect to redistribute this code under either of these licenses.
15 | */
16 |
17 | /**
18 | * == JSON
19 | *
20 | * Ceylon uses the https://herd.ceylon-lang.org/modules/ceylon.json[ceylon.json] module for http://json.org/[JSON].
21 | *
22 | * === JSON objects
23 | *
24 | * Ceylon uses `ceylon.json::Object` for representing a JSON object.
25 | *
26 | * === JSON arrays
27 | *
28 | * Ceylon uses `ceylon.json::Array` for representing a JSON array
29 | *
30 | */
31 | @Document(fileName = "override/json.adoc")
32 | package docoverride.json;
33 |
34 | import io.vertx.docgen.Document;
35 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/main/docoverride/docoverride/verticles/configuration/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2014 Red Hat, Inc.
3 | *
4 | * All rights reserved. This program and the accompanying materials
5 | * are made available under the terms of the Eclipse Public License v1.0
6 | * and Apache License v2.0 which accompanies this distribution.
7 | *
8 | * The Eclipse Public License is available at
9 | * http://www.eclipse.org/legal/epl-v10.html
10 | *
11 | * The Apache License v2.0 is available at
12 | * http://www.opensource.org/licenses/apache2.0.php
13 | *
14 | * You may elect to redistribute this code under either of these licenses.
15 | */
16 |
17 | /**
18 | * === Passing configuration to a verticle
19 | *
20 | * Configuration in the form of JSON can be passed to a verticle at deployment time:
21 | *
22 | * [source]
23 | * ----
24 | * value config = JsonObject {
25 | * "name"->"Tim",
26 | * "directory"->"blah"
27 | * };
28 | * value options = DeploymentOptions {
29 | * config = config;
30 | * };
31 | *
32 | * vertx.deployVerticle("otherVerticle.java", options);
33 | * ----
34 | *
35 | * NOTE: we suppose `ceylon.json::Object` is aliased to `JsonObject`
36 | *
37 | * This configuration is then available via the `io.vertx.ceylon.core::Context` object. The configuration is returned as a
38 | * `JsonObject` object so you can retrieve data as follows:
39 | *
40 | * [source]
41 | * ----
42 | * print("``vertx.getOrCreateContext().config()?.get("name") else "no config"``")
43 | * ----
44 | *
45 | * === Accessing environment variables in a Verticle
46 | *
47 | * Environment variables and system properties are accessible from a verticle using the Java API:
48 | *
49 | * [source,javascript]
50 | * ----
51 | * print("``System.getProperty("foo")``");
52 | * print("``System.getenv("HOME")``");
53 | * ----
54 | *
55 | */
56 | @Document(fileName = "override/verticle-configuration.adoc")
57 | package docoverride.configuration;
58 |
59 | import io.vertx.docgen.Document;
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/main/java/io/vertx/lang/ceylon/CeylonVerticle.java:
--------------------------------------------------------------------------------
1 | package io.vertx.lang.ceylon;
2 |
3 | import ceylon.language.DocAnnotation$annotation$;
4 | import io.vertx.core.AbstractVerticle;
5 | import io.vertx.core.Future;
6 | import io.vertx.core.Verticle;
7 |
8 | import java.lang.reflect.Method;
9 | import java.util.Map;
10 | import java.util.concurrent.Callable;
11 |
12 | /**
13 | * @author Julien Viet
14 | */
15 | public class CeylonVerticle extends AbstractVerticle {
16 |
17 | private final CeylonVerticleFactory.Module module;
18 | private Verticle verticle;
19 |
20 | public CeylonVerticle(CeylonVerticleFactory.Module module) {
21 | this.module = module;
22 | }
23 |
24 | // @DocAnnotation$annotation$(description = " When you add a new route with a regular expression, you can add named capture groups for parameters.
\n However, if you need more complex parameters names (like \"param_name\"), you can add parameters names with\n this function. You have to name capture groups in regex with names: \"p0\", \"p1\", \"p2\", ...
\n
\n For example: If you declare route with regex \/(?[a-z]*)\/(?[a-z]*) and group names [\"param_a\", \"param-b\"]\n for uri /hello/world you receive inside pathParams() the parameter param_a = \"hello\"\n")
25 | @DocAnnotation$annotation$(description = " When you add a new route with a regular expression, you can add named capture groups for parameters.
\n However, if you need more complex parameters names (like \"param_name\"), you can add parameters names with\n this function. You have to name capture groups in regex with names: \"p0\", \"p1\", \"p2\", ...
\n
\n For example: If you declare route with regex \\/(?[a-z]*)\\/(?[a-z]*) and group names ")
26 | @Override
27 | public void start(Future startFuture) throws Exception {
28 | ClassLoader loader = module.runner.getModuleClassLoader();
29 | Method introspector = loader.loadClass("io.vertx.ceylon.core.impl.resolveVerticles_").getDeclaredMethod("resolveVerticles", String.class, String.class);
30 | Map> moduleFactories = (Map>) introspector.invoke(null, module.name, null);
31 |
32 | Callable> factory = moduleFactories.values().iterator().next();
33 | verticle = (Verticle) factory.call();
34 | verticle.init(vertx, context);
35 | verticle.start(startFuture);
36 | }
37 |
38 | @Override
39 | public void stop(Future stopFuture) throws Exception {
40 | try {
41 | verticle.stop(stopFuture);
42 | } finally {
43 | module.removeInstance();
44 | }
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/main/java/io/vertx/lang/ceylon/ExtendedCompilerOptions.java:
--------------------------------------------------------------------------------
1 | package io.vertx.lang.ceylon;
2 |
3 | import com.redhat.ceylon.compiler.java.runtime.tools.CompilerOptions;
4 |
5 | /**
6 | * @author Julien Viet
7 | */
8 | public class ExtendedCompilerOptions extends CompilerOptions {
9 |
10 | private String target;
11 |
12 | public String getTarget() {
13 | return target;
14 | }
15 |
16 | public void setTarget(String target) {
17 | this.target = target;
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/main/resource/io/vertx/lang/ceylon/ROOT/META-INF/services/io.vertx.core.spi.VerticleFactory:
--------------------------------------------------------------------------------
1 | io.vertx.lang.ceylon.CeylonVerticleFactory
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/main/resources/META-INF/services/io.vertx.core.spi.VerticleFactory:
--------------------------------------------------------------------------------
1 | io.vertx.lang.ceylon.CeylonVerticleFactory
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/main/resources/codegen.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ceylon",
3 | "generators": [ {
4 | "kind": "class",
5 | "fileName": "'ceylon/' + model.type.translateName(TRANSLATOR_COMPOSITE).replace('.', '/') + '.java'",
6 | "templateFileName": "vertx-ceylon/template/ceylon-class.templ"
7 | },{
8 | "kind": "class",
9 | "fileName": "model.staticMethods.size() > 0 ? ('ceylon/' + model.type.translatePackageName(TRANSLATOR_COMPOSITE).replace('.', '/') + '/' + CASE_CAMEL.to(CASE_LOWER_CAMEL, model.type.simpleName) + '_.java') : null",
10 | "templateFileName": "vertx-ceylon/template/ceylon-object.templ"
11 | }, {
12 | "kind": "enum",
13 | "fileName": "'ceylon/' + model.type.translateName(TRANSLATOR_COMPOSITE).replace('.', '/') + '.ceylon'",
14 | "templateFileName": "vertx-ceylon/template/ceylon-enum.templ"
15 | }, {
16 | "kind": "package",
17 | "fileName": "'ceylon/' + TRANSLATOR_COMPOSITE.translate(module, fqn).replace('.', '/') + '/package.ceylon'",
18 | "templateFileName": "vertx-ceylon/template/ceylon-package.templ"
19 | }, {
20 | "kind": "dataObject",
21 | "fileName": "'ceylon/' + model.type.translateName(TRANSLATOR_COMPOSITE).replace('.', '/') + '.ceylon'",
22 | "templateFileName": "vertx-ceylon/template/ceylon-dataobject.templ"
23 | }
24 | ]
25 | }
26 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/main/resources/vertx-ceylon-version.txt:
--------------------------------------------------------------------------------
1 | ${project.version}
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/main/resources/vertx-ceylon/template/ceylon-enum.templ:
--------------------------------------------------------------------------------
1 | @includeNamed{'ceylon-common.templ'}
2 |
3 | @code{
4 | def toJavaEnumMember(name) {
5 | if (Character.isLowerCase(name.charAt(0))) {
6 | return name;
7 | } else {
8 | return '\\i' + name;
9 | }
10 | }
11 | def toCeylonEnumMember(name) {
12 | return toCeylonIdentifier(name.toLowerCase());
13 | }
14 | }
15 |
16 | import io.vertx.lang.ceylon { Converter }\n
17 | import @{type.packageName} { @{type.simpleName}_=@{type.simpleName} }\n
18 |
19 | \n
20 | @if{doc != null}
21 | "@{genDoc(doc)}"\n
22 | @end{}
23 | shared abstract class @{type.simpleName}(shared String name) of @foreach{value:values}@{toCeylonEnumMember(value.identifier)}@end{' | '} {\n
24 | }\n
25 |
26 | \n
27 | @foreach{value : values}
28 | @if{value.doc != null}
29 | "@{genDoc(value.doc)}"\n
30 | @end{}
31 | shared object @{toCeylonEnumMember(value.identifier)} extends @{type.simpleName}("@{value.identifier}") {}\n
32 | @end{}
33 |
34 | \n
35 | shared object @{CASE_CAMEL.to(CASE_LOWER_CAMEL, type.simpleName)} {\n
36 |
37 | \n
38 | shared String toString(@{type.simpleName} val) {\n
39 | switch (val)
40 | @foreach{value:values}
41 | \n
42 | case(@{toCeylonEnumMember(value.identifier)}) { return "@{value.identifier}"; }
43 | @end{}
44 | \n
45 | }\n
46 |
47 | \n
48 | shared @{type.simpleName} fromString(String val) {\n
49 | switch (val)
50 | @foreach{value:values}
51 | \n
52 | case("@{value.identifier}") { return @{toCeylonEnumMember(value.identifier)}; }
53 | @end{}
54 | \n
55 | else {\n
56 | throw Exception("Invalid @{type.simpleName} value ``val``");\n
57 | }\n
58 | }\n
59 |
60 | \n
61 | shared object toJava extends Converter<@{type.simpleName}, @{type.simpleName}_>() {\n
62 | shared actual @{type.simpleName}_ convert(@{type.simpleName} src) {\n
63 | switch (src)
64 | @foreach{value:values}
65 | \n
66 | case(@{toCeylonEnumMember(value.identifier)}) { return @{type.simpleName}_.@{toJavaEnumMember(value.identifier)}; }
67 | @end{}
68 | \n
69 | }\n
70 | }\n
71 |
72 | \n
73 | shared object toCeylon extends Converter<@{type.simpleName}_, @{type.simpleName}>() {\n
74 | shared actual @{type.simpleName} convert(@{type.simpleName}_ src) {\n
75 | @foreach{value:values}
76 | if (src == @{type.simpleName}_.@{toJavaEnumMember(value.identifier)}) {\n
77 | return @{toCeylonEnumMember(value.identifier)};\n
78 | }\n
79 | @end{}
80 | throw Exception("Invalid enum value");\n
81 | }\n
82 | }\n
83 |
84 | }\n
85 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/main/resources/vertx-ceylon/template/ceylon-object.templ:
--------------------------------------------------------------------------------
1 | @includeNamed{'ceylon-common.templ'}
2 |
3 | @code{packageName=type.translatePackageName(TRANSLATOR_COMPOSITE)}
4 | @code{objectName=CASE_CAMEL.to(CASE_LOWER_CAMEL, type.simpleName)}
5 | @code{indent=' '}
6 |
7 | package @{packageName};\n
8 |
9 | \n
10 | @includeNamed{'genImports'}
11 | \n
12 |
13 | @Ceylon(major = 8)\n
14 | @Name("@{objectName}")\n
15 | @com.redhat.ceylon.compiler.java.metadata.Object\n
16 | public class @{objectName}_ implements ReifiedType {\n
17 | \n
18 | private static final @{objectName}_ instance = new @{objectName}_();\n
19 | public static final TypeDescriptor $TypeDescriptor$ = TypeDescriptor.klass(@{objectName}_.class);\n
20 | \n
21 | @Ignore\n
22 | public TypeDescriptor $getType$() {\n
23 | return $TypeDescriptor$;\n
24 | }\n
25 | \n
26 | @Ignore\n
27 | @TypeInfo("@{type.translatePackageName(TRANSLATOR_COMPOSITE)}::@{objectName}")\n
28 | public static @{objectName}_ get_() {\n
29 | return instance;\n
30 | }\n
31 | \n
32 | @foreach{method:staticMethods}\n
33 | @includeNamed{'genMethodDecl'} {\n
34 | @includeNamed{'genMethodBody'}
35 | @{indent}}\n
36 | @end{}
37 | \n
38 | }\n
39 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/main/resources/vertx-ceylon/template/ceylon-package.templ:
--------------------------------------------------------------------------------
1 | @comment{'remove this hack'}
2 | shared package @{TRANSLATOR_COMPOSITE.translate(module, fqn)};
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/test/asciidoc/cheatsheet/TestDataObject.adoc:
--------------------------------------------------------------------------------
1 | == TestDataObject
2 |
3 | ++++
4 | @author Tim Fox
5 | ++++
6 | '''
7 |
8 | [cols=">25%,^25%,50%"]
9 | [frame="topbot"]
10 | |===
11 | ^|Name | Type ^| Description
12 |
13 | |[[bar]]`bar`
14 | |`Number (int)`
15 | |-
16 | |[[foo]]`foo`
17 | |`String`
18 | |-
19 | |[[wibble]]`wibble`
20 | |`Number (double)`
21 | |-|===
22 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/test/asciidoc/enums.adoc:
--------------------------------------------------------------------------------
1 | = Enums
2 |
3 | [[TestGenEnum]]
4 | == TestGenEnum
5 |
6 | ++++
7 | ++++
8 | '''
9 |
10 | [cols=">25%,75%"]
11 | [frame="topbot"]
12 | |===
13 | ^|Name | Description
14 | |[[LAURA]]`LAURA`|-
15 | |[[BOB]]`BOB`|-
16 | |[[MIKE]]`MIKE`|-
17 | |[[LELAND]]`LELAND`|-
18 | |===
19 |
20 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/test/ceylon/com/acme/ceylon/acme/myInterface_.java:
--------------------------------------------------------------------------------
1 | package com.acme.ceylon.acme;
2 |
3 | import com.redhat.ceylon.compiler.java.metadata.Ceylon;
4 | import com.redhat.ceylon.compiler.java.metadata.TypeInfo;
5 | import com.redhat.ceylon.compiler.java.metadata.TypeParameter;
6 | import com.redhat.ceylon.compiler.java.metadata.TypeParameters;
7 | import com.redhat.ceylon.compiler.java.metadata.Variance;
8 | import com.redhat.ceylon.compiler.java.metadata.Ignore;
9 | import com.redhat.ceylon.compiler.java.metadata.Name;
10 | import com.redhat.ceylon.compiler.java.runtime.model.TypeDescriptor;
11 | import com.redhat.ceylon.compiler.java.runtime.model.ReifiedType;
12 | import ceylon.language.Callable;
13 | import ceylon.language.DocAnnotation$annotation$;
14 | import com.acme.ceylon.acme.sub.SubInterface;
15 | import io.vertx.ceylon.testmodel.TestInterface;
16 |
17 | @Ceylon(major = 8)
18 | @Name("myInterface")
19 | @com.redhat.ceylon.compiler.java.metadata.Object
20 | public class myInterface_ implements ReifiedType {
21 |
22 | private static final myInterface_ instance = new myInterface_();
23 | public static final TypeDescriptor $TypeDescriptor$ = TypeDescriptor.klass(myInterface_.class);
24 |
25 | @Ignore
26 | public TypeDescriptor $getType$() {
27 | return $TypeDescriptor$;
28 | }
29 |
30 | @Ignore
31 | @TypeInfo("com.acme.ceylon.acme::myInterface")
32 | public static myInterface_ get_() {
33 | return instance;
34 | }
35 |
36 |
37 | @TypeInfo("com.acme.ceylon.acme::MyInterface")
38 | public MyInterface create() {
39 | MyInterface ret = com.acme.ceylon.acme.MyInterface.TO_CEYLON.converter().safeConvert(com.acme.pkg.MyInterface.create());
40 | return ret;
41 | }
42 |
43 | }
44 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/test/ceylon/com/acme/ceylon/acme/package.ceylon:
--------------------------------------------------------------------------------
1 | shared package com.acme.ceylon.acme;
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/test/ceylon/com/acme/ceylon/acme/sub/package.ceylon:
--------------------------------------------------------------------------------
1 | shared package com.acme.ceylon.acme.sub;
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/test/ceylon/config:
--------------------------------------------------------------------------------
1 | [repositories]
2 | global=/Users/julien/java/vertx-lang-ceylon/target/repo
3 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/test/ceylon/io/vertx/ceylon/testmodel/DataObjectWithBuffer.ceylon:
--------------------------------------------------------------------------------
1 | import io.vertx.codegen.testmodel {
2 | DataObjectWithBuffer_=DataObjectWithBuffer
3 | }
4 | import ceylon.time.iso8601 {
5 | parseZoneDateTime
6 | }
7 | import ceylon.json {
8 | JsonObject=Object,
9 | JsonArray=Array,
10 | parse
11 | }
12 | import io.vertx.lang.ceylon {
13 | BaseDataObject,
14 | Converter,
15 | ToJava
16 | }
17 | import ceylon.collection {
18 | HashMap
19 | }
20 | import ceylon.time {
21 | Instant
22 | }
23 | import io.vertx.core.json {
24 | JsonObject_=JsonObject,
25 | JsonArray_=JsonArray
26 | }
27 | /* Generated from io.vertx.codegen.testmodel.DataObjectWithBuffer */
28 | ""
29 | shared class DataObjectWithBuffer() satisfies BaseDataObject {
30 | shared actual default JsonObject toJson() {
31 | value json = JsonObject();
32 | return json;
33 | }
34 | }
35 |
36 | shared object dataObjectWithBuffer {
37 |
38 | shared DataObjectWithBuffer fromJson(JsonObject json) {
39 | return DataObjectWithBuffer {
40 | };
41 | }
42 |
43 | shared object toCeylon extends Converter() {
44 | shared actual DataObjectWithBuffer convert(DataObjectWithBuffer_ src) {
45 | value json = parse(src.toJson().string);
46 | assert(is JsonObject json);
47 | return fromJson(json);
48 | }
49 | }
50 |
51 | shared object toJava extends Converter() {
52 | shared actual DataObjectWithBuffer_ convert(DataObjectWithBuffer src) {
53 | // Todo : make optimized version without json
54 | value json = JsonObject_(src.toJson().string);
55 | value ret = DataObjectWithBuffer_(json);
56 | return ret;
57 | }
58 | }
59 | shared JsonObject toJson(DataObjectWithBuffer obj) => obj.toJson();
60 | }
61 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/test/ceylon/io/vertx/ceylon/testmodel/DataObjectWithNestedBuffer.ceylon:
--------------------------------------------------------------------------------
1 | import io.vertx.ceylon.testmodel {
2 | DataObjectWithBuffer,
3 | dataObjectWithBuffer_=dataObjectWithBuffer
4 | }
5 | import io.vertx.codegen.testmodel {
6 | DataObjectWithNestedBuffer_=DataObjectWithNestedBuffer
7 | }
8 | import ceylon.time.iso8601 {
9 | parseZoneDateTime
10 | }
11 | import ceylon.json {
12 | JsonObject=Object,
13 | JsonArray=Array,
14 | parse
15 | }
16 | import io.vertx.lang.ceylon {
17 | BaseDataObject,
18 | Converter,
19 | ToJava
20 | }
21 | import ceylon.collection {
22 | HashMap
23 | }
24 | import ceylon.time {
25 | Instant
26 | }
27 | import io.vertx.core.json {
28 | JsonObject_=JsonObject,
29 | JsonArray_=JsonArray
30 | }
31 | /* Generated from io.vertx.codegen.testmodel.DataObjectWithNestedBuffer */
32 | ""
33 | shared class DataObjectWithNestedBuffer(
34 | shared DataObjectWithBuffer? nested = null) satisfies BaseDataObject {
35 | shared actual default JsonObject toJson() {
36 | value json = JsonObject();
37 | if (exists nested) {
38 | json.put("nested", nested.toJson());
39 | }
40 | return json;
41 | }
42 | }
43 |
44 | shared object dataObjectWithNestedBuffer {
45 |
46 | shared DataObjectWithNestedBuffer fromJson(JsonObject json) {
47 | DataObjectWithBuffer? nested = if (exists tmp = json.getObjectOrNull("nested")) then dataObjectWithBuffer_.fromJson(tmp) else null;
48 | return DataObjectWithNestedBuffer {
49 | nested = nested;
50 | };
51 | }
52 |
53 | shared object toCeylon extends Converter() {
54 | shared actual DataObjectWithNestedBuffer convert(DataObjectWithNestedBuffer_ src) {
55 | value json = parse(src.toJson().string);
56 | assert(is JsonObject json);
57 | return fromJson(json);
58 | }
59 | }
60 |
61 | shared object toJava extends Converter() {
62 | shared actual DataObjectWithNestedBuffer_ convert(DataObjectWithNestedBuffer src) {
63 | // Todo : make optimized version without json
64 | value json = JsonObject_(src.toJson().string);
65 | value ret = DataObjectWithNestedBuffer_(json);
66 | return ret;
67 | }
68 | }
69 | shared JsonObject toJson(DataObjectWithNestedBuffer obj) => obj.toJson();
70 | }
71 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/test/ceylon/io/vertx/ceylon/testmodel/DataObjectWithOnlyJsonObjectConstructor.ceylon:
--------------------------------------------------------------------------------
1 | import io.vertx.codegen.testmodel {
2 | DataObjectWithOnlyJsonObjectConstructor_=DataObjectWithOnlyJsonObjectConstructor
3 | }
4 | import ceylon.time.iso8601 {
5 | parseZoneDateTime
6 | }
7 | import ceylon.json {
8 | JsonObject=Object,
9 | JsonArray=Array,
10 | parse
11 | }
12 | import io.vertx.lang.ceylon {
13 | BaseDataObject,
14 | Converter,
15 | ToJava
16 | }
17 | import ceylon.collection {
18 | HashMap
19 | }
20 | import ceylon.time {
21 | Instant
22 | }
23 | import io.vertx.core.json {
24 | JsonObject_=JsonObject,
25 | JsonArray_=JsonArray
26 | }
27 | /* Generated from io.vertx.codegen.testmodel.DataObjectWithOnlyJsonObjectConstructor */
28 | ""
29 | shared class DataObjectWithOnlyJsonObjectConstructor(
30 | shared String? foo = null) satisfies BaseDataObject {
31 | shared actual default JsonObject toJson() {
32 | value json = JsonObject();
33 | if (exists foo) {
34 | json.put("foo", foo);
35 | }
36 | return json;
37 | }
38 | }
39 |
40 | shared object dataObjectWithOnlyJsonObjectConstructor {
41 |
42 | shared DataObjectWithOnlyJsonObjectConstructor fromJson(JsonObject json) {
43 | String? foo = json.getStringOrNull("foo");
44 | return DataObjectWithOnlyJsonObjectConstructor {
45 | foo = foo;
46 | };
47 | }
48 |
49 | shared object toCeylon extends Converter() {
50 | shared actual DataObjectWithOnlyJsonObjectConstructor convert(DataObjectWithOnlyJsonObjectConstructor_ src) {
51 | value json = parse(src.toJson().string);
52 | assert(is JsonObject json);
53 | return fromJson(json);
54 | }
55 | }
56 |
57 | shared object toJava extends Converter() {
58 | shared actual DataObjectWithOnlyJsonObjectConstructor_ convert(DataObjectWithOnlyJsonObjectConstructor src) {
59 | // Todo : make optimized version without json
60 | value json = JsonObject_(src.toJson().string);
61 | value ret = DataObjectWithOnlyJsonObjectConstructor_(json);
62 | return ret;
63 | }
64 | }
65 | shared JsonObject toJson(DataObjectWithOnlyJsonObjectConstructor obj) => obj.toJson();
66 | }
67 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/test/ceylon/io/vertx/ceylon/testmodel/DataObjectWithRecursion.ceylon:
--------------------------------------------------------------------------------
1 | import io.vertx.ceylon.testmodel {
2 | DataObjectWithRecursion,
3 | dataObjectWithRecursion_=dataObjectWithRecursion
4 | }
5 | import io.vertx.codegen.testmodel {
6 | DataObjectWithRecursion_=DataObjectWithRecursion
7 | }
8 | import ceylon.time.iso8601 {
9 | parseZoneDateTime
10 | }
11 | import ceylon.json {
12 | JsonObject=Object,
13 | JsonArray=Array,
14 | parse
15 | }
16 | import io.vertx.lang.ceylon {
17 | BaseDataObject,
18 | Converter,
19 | ToJava
20 | }
21 | import ceylon.collection {
22 | HashMap
23 | }
24 | import ceylon.time {
25 | Instant
26 | }
27 | import io.vertx.core.json {
28 | JsonObject_=JsonObject,
29 | JsonArray_=JsonArray
30 | }
31 | /* Generated from io.vertx.codegen.testmodel.DataObjectWithRecursion */
32 | ""
33 | shared class DataObjectWithRecursion(
34 | shared String? data = null,
35 | shared DataObjectWithRecursion? next = null) satisfies BaseDataObject {
36 | shared actual default JsonObject toJson() {
37 | value json = JsonObject();
38 | if (exists data) {
39 | json.put("data", data);
40 | }
41 | if (exists next) {
42 | json.put("next", next.toJson());
43 | }
44 | return json;
45 | }
46 | }
47 |
48 | shared object dataObjectWithRecursion {
49 |
50 | shared DataObjectWithRecursion fromJson(JsonObject json) {
51 | String? data = json.getStringOrNull("data");
52 | DataObjectWithRecursion? next = if (exists tmp = json.getObjectOrNull("next")) then this.fromJson(tmp) else null;
53 | return DataObjectWithRecursion {
54 | data = data;
55 | next = next;
56 | };
57 | }
58 |
59 | shared object toCeylon extends Converter() {
60 | shared actual DataObjectWithRecursion convert(DataObjectWithRecursion_ src) {
61 | value json = parse(src.toJson().string);
62 | assert(is JsonObject json);
63 | return fromJson(json);
64 | }
65 | }
66 |
67 | shared object toJava extends Converter() {
68 | shared actual DataObjectWithRecursion_ convert(DataObjectWithRecursion src) {
69 | // Todo : make optimized version without json
70 | value json = JsonObject_(src.toJson().string);
71 | value ret = DataObjectWithRecursion_(json);
72 | return ret;
73 | }
74 | }
75 | shared JsonObject toJson(DataObjectWithRecursion obj) => obj.toJson();
76 | }
77 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/test/ceylon/io/vertx/ceylon/testmodel/Factory.java:
--------------------------------------------------------------------------------
1 | package io.vertx.ceylon.testmodel;
2 |
3 | import com.redhat.ceylon.compiler.java.metadata.Ceylon;
4 | import com.redhat.ceylon.compiler.java.metadata.TypeInfo;
5 | import com.redhat.ceylon.compiler.java.metadata.TypeParameter;
6 | import com.redhat.ceylon.compiler.java.metadata.TypeParameters;
7 | import com.redhat.ceylon.compiler.java.metadata.Variance;
8 | import com.redhat.ceylon.compiler.java.metadata.Ignore;
9 | import com.redhat.ceylon.compiler.java.metadata.Name;
10 | import com.redhat.ceylon.compiler.java.runtime.model.TypeDescriptor;
11 | import com.redhat.ceylon.compiler.java.runtime.model.ReifiedType;
12 | import ceylon.language.Callable;
13 | import ceylon.language.DocAnnotation$annotation$;
14 | import io.vertx.core.Handler;
15 |
16 | @Ceylon(major = 8)
17 | @DocAnnotation$annotation$(description = "")
18 | public class Factory implements ReifiedType {
19 |
20 | @Ignore
21 | public static final io.vertx.lang.ceylon.ConverterFactory TO_CEYLON = new io.vertx.lang.ceylon.ConverterFactory() {
22 | public io.vertx.lang.ceylon.Converter converter(final TypeDescriptor... descriptors) {
23 | return new io.vertx.lang.ceylon.Converter() {
24 | public Factory convert(io.vertx.codegen.testmodel.Factory src) {
25 | return new Factory(src);
26 | }
27 | };
28 | }
29 | };
30 |
31 | @Ignore
32 | public static final io.vertx.lang.ceylon.Converter TO_JAVA = new io.vertx.lang.ceylon.Converter() {
33 | public io.vertx.codegen.testmodel.Factory convert(Factory src) {
34 | return src.delegate;
35 | }
36 | };
37 |
38 | @Ignore public static final TypeDescriptor $TypeDescriptor$ = new io.vertx.lang.ceylon.VertxTypeDescriptor(TypeDescriptor.klass(Factory.class), io.vertx.codegen.testmodel.Factory.class, TO_JAVA, TO_CEYLON);
39 | @Ignore private final io.vertx.codegen.testmodel.Factory delegate;
40 |
41 | public Factory(io.vertx.codegen.testmodel.Factory delegate) {
42 | this.delegate = delegate;
43 | }
44 |
45 | @Ignore
46 | public TypeDescriptor $getType$() {
47 | return $TypeDescriptor$;
48 | }
49 |
50 | @Ignore
51 | public Object getDelegate() {
52 | return delegate;
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/test/ceylon/io/vertx/ceylon/testmodel/TestDataObject.ceylon:
--------------------------------------------------------------------------------
1 | import io.vertx.codegen.testmodel {
2 | TestDataObject_=TestDataObject
3 | }
4 | import ceylon.time.iso8601 {
5 | parseZoneDateTime
6 | }
7 | import ceylon.json {
8 | JsonObject=Object,
9 | JsonArray=Array,
10 | parse
11 | }
12 | import io.vertx.lang.ceylon {
13 | BaseDataObject,
14 | Converter,
15 | ToJava
16 | }
17 | import ceylon.collection {
18 | HashMap
19 | }
20 | import ceylon.time {
21 | Instant
22 | }
23 | import io.vertx.core.json {
24 | JsonObject_=JsonObject,
25 | JsonArray_=JsonArray
26 | }
27 | /* Generated from io.vertx.codegen.testmodel.TestDataObject */
28 | ""
29 | shared class TestDataObject(
30 | shared Integer? bar = null,
31 | shared String? foo = null,
32 | shared Float? wibble = null) satisfies BaseDataObject {
33 | shared actual default JsonObject toJson() {
34 | value json = JsonObject();
35 | if (exists bar) {
36 | json.put("bar", bar);
37 | }
38 | if (exists foo) {
39 | json.put("foo", foo);
40 | }
41 | if (exists wibble) {
42 | json.put("wibble", wibble);
43 | }
44 | return json;
45 | }
46 | }
47 |
48 | shared object testDataObject {
49 |
50 | shared TestDataObject fromJson(JsonObject json) {
51 | Integer? bar = json.getIntegerOrNull("bar");
52 | String? foo = json.getStringOrNull("foo");
53 | Float? wibble = json.getFloatOrNull("wibble");
54 | return TestDataObject {
55 | bar = bar;
56 | foo = foo;
57 | wibble = wibble;
58 | };
59 | }
60 |
61 | shared object toCeylon extends Converter() {
62 | shared actual TestDataObject convert(TestDataObject_ src) {
63 | value json = parse(src.toJson().string);
64 | assert(is JsonObject json);
65 | return fromJson(json);
66 | }
67 | }
68 |
69 | shared object toJava extends Converter() {
70 | shared actual TestDataObject_ convert(TestDataObject src) {
71 | // Todo : make optimized version without json
72 | value json = JsonObject_(src.toJson().string);
73 | value ret = TestDataObject_(json);
74 | return ret;
75 | }
76 | }
77 | shared JsonObject toJson(TestDataObject obj) => obj.toJson();
78 | }
79 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/test/ceylon/io/vertx/ceylon/testmodel/TestGenEnum.ceylon:
--------------------------------------------------------------------------------
1 | import io.vertx.lang.ceylon { Converter }
2 | import io.vertx.codegen.testmodel { TestGenEnum_=TestGenEnum }
3 |
4 | ""
5 | shared abstract class TestGenEnum(shared String name) of laura | bob | mike | leland {
6 | }
7 |
8 | shared object laura extends TestGenEnum("LAURA") {}
9 | shared object bob extends TestGenEnum("BOB") {}
10 | shared object mike extends TestGenEnum("MIKE") {}
11 | shared object leland extends TestGenEnum("LELAND") {}
12 |
13 | shared object testGenEnum {
14 |
15 | shared String toString(TestGenEnum val) {
16 | switch (val)
17 | case(laura) { return "LAURA"; }
18 | case(bob) { return "BOB"; }
19 | case(mike) { return "MIKE"; }
20 | case(leland) { return "LELAND"; }
21 | }
22 |
23 | shared TestGenEnum fromString(String val) {
24 | switch (val)
25 | case("LAURA") { return laura; }
26 | case("BOB") { return bob; }
27 | case("MIKE") { return mike; }
28 | case("LELAND") { return leland; }
29 | else {
30 | throw Exception("Invalid TestGenEnum value ``val``");
31 | }
32 | }
33 |
34 | shared object toJava extends Converter() {
35 | shared actual TestGenEnum_ convert(TestGenEnum src) {
36 | switch (src)
37 | case(laura) { return TestGenEnum_.\iLAURA; }
38 | case(bob) { return TestGenEnum_.\iBOB; }
39 | case(mike) { return TestGenEnum_.\iMIKE; }
40 | case(leland) { return TestGenEnum_.\iLELAND; }
41 | }
42 | }
43 |
44 | shared object toCeylon extends Converter() {
45 | shared actual TestGenEnum convert(TestGenEnum_ src) {
46 | if (src == TestGenEnum_.\iLAURA) {
47 | return laura;
48 | }
49 | if (src == TestGenEnum_.\iBOB) {
50 | return bob;
51 | }
52 | if (src == TestGenEnum_.\iMIKE) {
53 | return mike;
54 | }
55 | if (src == TestGenEnum_.\iLELAND) {
56 | return leland;
57 | }
58 | throw Exception("Invalid enum value");
59 | }
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/test/ceylon/io/vertx/ceylon/testmodel/module.ceylon:
--------------------------------------------------------------------------------
1 | native("jvm")
2 | module io.vertx.ceylon.testmodel "${project.version}" {
3 | native("jvm") import java.base "7";
4 | shared import ceylon.json "1.3.3";
5 | shared import ceylon.time "1.3.3";
6 | shared import io.vertx.lang.ceylon "${project.version}";
7 | shared import "io.vertx.vertx-codegen-tck" "${project.version}"; // io.vertx.ceylon.codegen.testmodel
8 | }
9 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/test/ceylon/io/vertx/ceylon/testmodel/package.ceylon:
--------------------------------------------------------------------------------
1 | shared package io.vertx.ceylon.testmodel;
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/test/ceylon/io/vertx/ceylon/testmodel/testInterface_.java:
--------------------------------------------------------------------------------
1 | package io.vertx.ceylon.testmodel;
2 |
3 | import com.redhat.ceylon.compiler.java.metadata.Ceylon;
4 | import com.redhat.ceylon.compiler.java.metadata.TypeInfo;
5 | import com.redhat.ceylon.compiler.java.metadata.TypeParameter;
6 | import com.redhat.ceylon.compiler.java.metadata.TypeParameters;
7 | import com.redhat.ceylon.compiler.java.metadata.Variance;
8 | import com.redhat.ceylon.compiler.java.metadata.Ignore;
9 | import com.redhat.ceylon.compiler.java.metadata.Name;
10 | import com.redhat.ceylon.compiler.java.runtime.model.TypeDescriptor;
11 | import com.redhat.ceylon.compiler.java.runtime.model.ReifiedType;
12 | import ceylon.language.Callable;
13 | import ceylon.language.DocAnnotation$annotation$;
14 | import io.vertx.codegen.testmodel.TestEnum;
15 | import io.vertx.core.json.JsonObject;
16 | import io.vertx.core.AsyncResult;
17 | import io.vertx.core.json.JsonArray;
18 | import java.util.List;
19 | import io.vertx.core.Handler;
20 |
21 | @Ceylon(major = 8)
22 | @Name("testInterface")
23 | @com.redhat.ceylon.compiler.java.metadata.Object
24 | public class testInterface_ implements ReifiedType {
25 |
26 | private static final testInterface_ instance = new testInterface_();
27 | public static final TypeDescriptor $TypeDescriptor$ = TypeDescriptor.klass(testInterface_.class);
28 |
29 | @Ignore
30 | public TypeDescriptor $getType$() {
31 | return $TypeDescriptor$;
32 | }
33 |
34 | @Ignore
35 | @TypeInfo("io.vertx.ceylon.testmodel::testInterface")
36 | public static testInterface_ get_() {
37 | return instance;
38 | }
39 |
40 |
41 | @TypeInfo("io.vertx.ceylon.testmodel::RefedInterface1")
42 | public RefedInterface1 staticFactoryMethod(
43 | final @TypeInfo("ceylon.language::String") @Name("foo") ceylon.language.String foo) {
44 | java.lang.String arg_0 = io.vertx.lang.ceylon.ToJava.String.safeConvert(foo);
45 | RefedInterface1 ret = io.vertx.ceylon.testmodel.RefedInterface1.TO_CEYLON.converter().safeConvert(io.vertx.codegen.testmodel.TestInterface.staticFactoryMethod(arg_0));
46 | return ret;
47 | }
48 |
49 | }
50 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/test/ceylon/io/vertx/tests/deployTests.ceylon:
--------------------------------------------------------------------------------
1 | import io.vertx.ceylon.core { Verticle, Vertx, vertx }
2 | import java.util.concurrent { CountDownLatch }
3 | import ceylon.test { test }
4 |
5 | shared test void testDeployVerticleInstance() {
6 | Vertx instance = vertx.vertx();
7 | try {
8 | value latch = CountDownLatch(2);
9 | object verticle extends Verticle() {
10 | shared actual void start() {
11 | value v = instance;
12 | value c = context;
13 | latch.countDown();
14 | }
15 | }
16 | verticle.deploy(instance, null, (String|Throwable id) => latch.countDown());
17 | latch.await();
18 | } finally {
19 | instance.close();
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/test/ceylon/io/vertx/tests/module.ceylon:
--------------------------------------------------------------------------------
1 | native("jvm")
2 | module io.vertx.tests "${project.version}" {
3 | native("jvm") import java.base "7";
4 | shared import io.vertx.ceylon.testmodel "${project.version}";
5 | import ceylon.test "1.3.3";
6 | import io.vertx.ceylon.core "${project.version}";
7 | }
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/test/ceylon/io/vertx/tests/package.ceylon:
--------------------------------------------------------------------------------
1 | shared package io.vertx.tests;
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/test/ceylon/io/vertx/tests/reificationTests.ceylon:
--------------------------------------------------------------------------------
1 | import io.vertx.ceylon.core { Vertx, vertx }
2 | import io.vertx.ceylon.core.eventbus { Message }
3 | import java.util.concurrent { CountDownLatch }
4 | import ceylon.test { test }
5 |
6 | shared test void testMessageReply() {
7 | value instance = vertx.vertx();
8 | try {
9 | value latch = CountDownLatch(1);
10 | instance.eventBus().consumer("the_address", (Message msg) => msg.reply("the_reply"));
11 | instance.eventBus().send("the_address", "the_message", void (Message|Throwable reply) {
12 | switch (reply)
13 | case (is Message) {
14 | latch.countDown();
15 | } else {
16 | }
17 | });
18 | latch.await();
19 | } finally {
20 | instance.close();
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/test/ceylon/io/vertx/tests/run.ceylon:
--------------------------------------------------------------------------------
1 | import ceylon.test {
2 | ...
3 | }
4 |
5 | import ceylon.test.engine {
6 | DefaultLoggingListener
7 | }
8 |
9 | shared void run() {
10 | value runner = createTestRunner([`module io.vertx.tests`], [DefaultLoggingListener()]);
11 | value result = runner.run();
12 | print(result);
13 | }
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/test/ceylon/verticles/deployer/DeployerVerticle.ceylon:
--------------------------------------------------------------------------------
1 | import io.vertx.ceylon.core { Verticle, Future }
2 |
3 | shared class DeployerVerticle() extends Verticle() {
4 |
5 | shared actual void startAsync(Future fut) {
6 | assert(exists cfg = config);
7 | assert(is String verticleName = cfg["verticleName"]);
8 | void handleResult(Throwable|String result) {
9 | if (is String result) {
10 | fut.complete();
11 | } else {
12 | result.printStackTrace();
13 | fut.fail("could not deploy ``verticleName``");
14 | }
15 | }
16 | vertx.deployVerticle(verticleName, handleResult);
17 | }
18 |
19 | shared actual void stop() {
20 | }
21 | }
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/test/ceylon/verticles/deployer/module.ceylon:
--------------------------------------------------------------------------------
1 | native("jvm")
2 | module verticles.deployer "1.0.0" {
3 | native("jvm") shared import "io.vertx.ceylon.core" "${project.version}";
4 | }
5 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/test/ceylon/verticles/deployer/package.ceylon:
--------------------------------------------------------------------------------
1 | shared package verticles.deployer;
2 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/test/ceylon/verticles/simple/SimpleVerticle.ceylon:
--------------------------------------------------------------------------------
1 | import io.vertx.ceylon.core { Verticle }
2 | import java.lang { System }
3 |
4 | shared class SimpleVerticle() extends Verticle() {
5 |
6 | shared actual void start() {
7 | value prop = "ceylon.verticle.``deploymentID``";
8 | lock.lock();
9 | try {
10 | System.setProperty(prop, "``++counter``");
11 | } finally {
12 | lock.unlock();
13 | }
14 | }
15 |
16 | shared actual void stop() {
17 | value prop = "ceylon.verticle.``deploymentID``";
18 | lock.lock();
19 | try {
20 | System.setProperty(prop, "``--counter``");
21 | } finally {
22 | lock.unlock();
23 | }
24 | }
25 | }
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/test/ceylon/verticles/simple/counter.ceylon:
--------------------------------------------------------------------------------
1 | variable Integer counter = 0;
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/test/ceylon/verticles/simple/lock.ceylon:
--------------------------------------------------------------------------------
1 | import java.util.concurrent.locks { ReentrantLock }
2 |
3 | ReentrantLock lock = ReentrantLock();
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/test/ceylon/verticles/simple/module.ceylon:
--------------------------------------------------------------------------------
1 | native("jvm")
2 | module verticles.simple "1.0.0" {
3 | native("jvm") shared import "io.vertx.ceylon.core" "${project.version}";
4 | }
5 |
--------------------------------------------------------------------------------
/vertx-lang-ceylon/src/test/ceylon/verticles/simple/package.ceylon:
--------------------------------------------------------------------------------
1 | shared package verticles.simple;
2 |
--------------------------------------------------------------------------------