connect();
89 |
90 | /**
91 | * Configures a received handler that gets notified when a STOMP frame is received by the client.
92 | * This handler can be used for logging, debugging or ad-hoc behavior. The frame can still be modified at the time.
93 | *
94 | * When a connection is created, the handler is used as
95 | * {@link StompClientConnection#receivedFrameHandler(Handler)}.
96 | *
97 | * @param handler the handler
98 | * @return the current {@link StompClient}
99 | */
100 | @Fluent
101 | StompClient receivedFrameHandler(Handler handler);
102 |
103 | /**
104 | * Configures a writing handler that gets notified when a STOMP frame is written on the wire.
105 | * This handler can be used for logging, debugging or ad-hoc behavior. The frame can still be modified at the time.
106 | *
107 | * When a connection is created, the handler is used as
108 | * {@link StompClientConnection#writingFrameHandler(Handler)}.
109 | *
110 | * @param handler the handler
111 | * @return the current {@link StompClient}
112 | */
113 | @Fluent
114 | StompClient writingFrameHandler(Handler handler);
115 |
116 | /**
117 | * A general error frame handler. It can be used to catch {@code ERROR} frame emitted during the connection process
118 | * (wrong authentication). This error handler will be pass to all {@link StompClientConnection} created from this
119 | * client. Obviously, the client can override it when the connection is established.
120 | *
121 | * @param handler the handler
122 | * @return the current {@link StompClient}
123 | */
124 | @Fluent
125 | StompClient errorFrameHandler(Handler handler);
126 |
127 | /**
128 | * Sets an exception handler notified for TCP-level errors.
129 | *
130 | * @param handler the handler
131 | * @return the current {@link StompClient}
132 | */
133 | @Fluent
134 | StompClient exceptionHandler(Handler handler);
135 |
136 | /**
137 | * Closes the client.
138 | */
139 | void close();
140 |
141 | /**
142 | * @return the client's options.
143 | */
144 | StompClientOptions options();
145 |
146 | /**
147 | * @return the vert.x instance used by the client.
148 | */
149 | Vertx vertx();
150 |
151 | /**
152 | * @return whether or not the client is connected to the server.
153 | */
154 | boolean isClosed();
155 | }
156 |
--------------------------------------------------------------------------------
/src/main/generated/io/vertx/ext/stomp/StompServerOptionsConverter.java:
--------------------------------------------------------------------------------
1 | package io.vertx.ext.stomp;
2 |
3 | import io.vertx.core.json.JsonObject;
4 | import io.vertx.core.json.JsonArray;
5 | import io.vertx.core.json.impl.JsonUtil;
6 | import java.time.Instant;
7 | import java.time.format.DateTimeFormatter;
8 | import java.util.Base64;
9 |
10 | /**
11 | * Converter and mapper for {@link io.vertx.ext.stomp.StompServerOptions}.
12 | * NOTE: This class has been automatically generated from the {@link io.vertx.ext.stomp.StompServerOptions} original class using Vert.x codegen.
13 | */
14 | public class StompServerOptionsConverter {
15 |
16 |
17 | private static final Base64.Decoder BASE64_DECODER = JsonUtil.BASE64_DECODER;
18 | private static final Base64.Encoder BASE64_ENCODER = JsonUtil.BASE64_ENCODER;
19 |
20 | public static void fromJson(Iterable> json, StompServerOptions obj) {
21 | for (java.util.Map.Entry member : json) {
22 | switch (member.getKey()) {
23 | case "heartbeat":
24 | if (member.getValue() instanceof JsonObject) {
25 | obj.setHeartbeat(((JsonObject)member.getValue()).copy());
26 | }
27 | break;
28 | case "maxBodyLength":
29 | if (member.getValue() instanceof Number) {
30 | obj.setMaxBodyLength(((Number)member.getValue()).intValue());
31 | }
32 | break;
33 | case "maxFrameInTransaction":
34 | if (member.getValue() instanceof Number) {
35 | obj.setMaxFrameInTransaction(((Number)member.getValue()).intValue());
36 | }
37 | break;
38 | case "maxHeaderLength":
39 | if (member.getValue() instanceof Number) {
40 | obj.setMaxHeaderLength(((Number)member.getValue()).intValue());
41 | }
42 | break;
43 | case "maxHeaders":
44 | if (member.getValue() instanceof Number) {
45 | obj.setMaxHeaders(((Number)member.getValue()).intValue());
46 | }
47 | break;
48 | case "maxSubscriptionsByClient":
49 | if (member.getValue() instanceof Number) {
50 | obj.setMaxSubscriptionsByClient(((Number)member.getValue()).intValue());
51 | }
52 | break;
53 | case "secured":
54 | if (member.getValue() instanceof Boolean) {
55 | obj.setSecured((Boolean)member.getValue());
56 | }
57 | break;
58 | case "sendErrorOnNoSubscriptions":
59 | if (member.getValue() instanceof Boolean) {
60 | obj.setSendErrorOnNoSubscriptions((Boolean)member.getValue());
61 | }
62 | break;
63 | case "supportedVersions":
64 | if (member.getValue() instanceof JsonArray) {
65 | java.util.ArrayList list = new java.util.ArrayList<>();
66 | ((Iterable