class io.vertx.ext.web.handler.sockjs.impl.HtmlFileTransport extends io.vertx.ext.web.handler.sockjs.impl.BaseTransport
minor version: 0
major version: 59
flags: flags: (0x0020) ACC_SUPER
this_class: io.vertx.ext.web.handler.sockjs.impl.HtmlFileTransport
super_class: io.vertx.ext.web.handler.sockjs.impl.BaseTransport
{
private static final io.vertx.core.logging.Logger log;
descriptor: Lio/vertx/core/logging/Logger;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private static final java.util.regex.Pattern CALLBACK_VALIDATION;
descriptor: Ljava/util/regex/Pattern;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private static final java.lang.String HTML_FILE_TEMPLATE;
descriptor: Ljava/lang/String;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=3, locals=5, args_size=0
0: ldc Lio/vertx/ext/web/handler/sockjs/impl/HtmlFileTransport;
invokestatic io.vertx.core.logging.LoggerFactory.getLogger:(Ljava/lang/Class;)Lio/vertx/core/logging/Logger;
putstatic io.vertx.ext.web.handler.sockjs.impl.HtmlFileTransport.log:Lio/vertx/core/logging/Logger;
1: ldc "[^a-zA-Z0-9-_.]"
invokestatic java.util.regex.Pattern.compile:(Ljava/lang/String;)Ljava/util/regex/Pattern;
putstatic io.vertx.ext.web.handler.sockjs.impl.HtmlFileTransport.CALLBACK_VALIDATION:Ljava/util/regex/Pattern;
2: ldc "<!doctype html>\n<html><head>\n <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\" />\n <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />\n</head><body><h2>Don't panic!</h2>\n <script>\n document.domain = document.domain;\n var c = parent.{{ callback }};\n c.start();\n function p(d) {c.message(d);};\n window.onload = function() {c.stop();};\n </script>"
3: astore 0
start local 0 4: aload 0
ldc "{{ callback }}"
ldc ""
invokevirtual java.lang.String.replace:(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
astore 1
start local 1 5: new java.lang.StringBuilder
dup
aload 0
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
astore 2
start local 2 6: sipush 1024
aload 1
invokevirtual java.lang.String.length:()I
isub
istore 3
start local 3 7: iconst_0
istore 4
start local 4 8: goto 11
9: StackMap locals: java.lang.String java.lang.String java.lang.StringBuilder int int
StackMap stack:
aload 2
bipush 32
invokevirtual java.lang.StringBuilder.append:(C)Ljava/lang/StringBuilder;
pop
10: iinc 4 1
StackMap locals:
StackMap stack:
11: iload 4
iload 3
if_icmplt 9
end local 4 12: aload 2
ldc "\r\n"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
pop
13: aload 2
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
putstatic io.vertx.ext.web.handler.sockjs.impl.HtmlFileTransport.HTML_FILE_TEMPLATE:Ljava/lang/String;
end local 3 end local 2 end local 1 end local 0 14: return
LocalVariableTable:
Start End Slot Name Signature
4 14 0 str Ljava/lang/String;
5 14 1 str2 Ljava/lang/String;
6 14 2 sb Ljava/lang/StringBuilder;
7 14 3 extra I
8 12 4 i I
void <init>(io.vertx.core.Vertx, io.vertx.ext.web.Router, io.vertx.core.shareddata.LocalMap<java.lang.String, io.vertx.ext.web.handler.sockjs.impl.SockJSSession>, io.vertx.ext.web.handler.sockjs.SockJSHandlerOptions, io.vertx.core.Handler<io.vertx.ext.web.handler.sockjs.SockJSSocket>);
descriptor: (Lio/vertx/core/Vertx;Lio/vertx/ext/web/Router;Lio/vertx/core/shareddata/LocalMap;Lio/vertx/ext/web/handler/sockjs/SockJSHandlerOptions;Lio/vertx/core/Handler;)V
flags: (0x0000)
Code:
stack=4, locals=7, args_size=6
start local 0 start local 1 start local 2 start local 3 start local 4 start local 5 0: aload 0
aload 1
aload 3
aload 4
invokespecial io.vertx.ext.web.handler.sockjs.impl.BaseTransport.<init>:(Lio/vertx/core/Vertx;Lio/vertx/core/shareddata/LocalMap;Lio/vertx/ext/web/handler/sockjs/SockJSHandlerOptions;)V
1: ldc "\\/[^\\/\\.]+\\/([^\\/\\.]+)\\/htmlfile.*"
astore 6
start local 6 2: aload 2
aload 6
invokeinterface io.vertx.ext.web.Router.getWithRegex:(Ljava/lang/String;)Lio/vertx/ext/web/Route;
aload 0
aload 4
aload 5
invokedynamic handle(Lio/vertx/ext/web/handler/sockjs/impl/HtmlFileTransport;Lio/vertx/ext/web/handler/sockjs/SockJSHandlerOptions;Lio/vertx/core/Handler;)Lio/vertx/core/Handler;
Bootstrap: invokestatic java.lang.invoke.LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;
Method arguments:
(Ljava/lang/Object;)V
io/vertx/ext/web/handler/sockjs/impl/HtmlFileTransport.lambda$0(Lio/vertx/ext/web/handler/sockjs/SockJSHandlerOptions;Lio/vertx/core/Handler;Lio/vertx/ext/web/RoutingContext;)V (7)
(Lio/vertx/ext/web/RoutingContext;)V
invokeinterface io.vertx.ext.web.Route.handler:(Lio/vertx/core/Handler;)Lio/vertx/ext/web/Route;
pop
3: return
end local 6 end local 5 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lio/vertx/ext/web/handler/sockjs/impl/HtmlFileTransport;
0 4 1 vertx Lio/vertx/core/Vertx;
0 4 2 router Lio/vertx/ext/web/Router;
0 4 3 sessions Lio/vertx/core/shareddata/LocalMap<Ljava/lang/String;Lio/vertx/ext/web/handler/sockjs/impl/SockJSSession;>;
0 4 4 options Lio/vertx/ext/web/handler/sockjs/SockJSHandlerOptions;
0 4 5 sockHandler Lio/vertx/core/Handler<Lio/vertx/ext/web/handler/sockjs/SockJSSocket;>;
2 4 6 htmlFileRE Ljava/lang/String;
Signature: (Lio/vertx/core/Vertx;Lio/vertx/ext/web/Router;Lio/vertx/core/shareddata/LocalMap<Ljava/lang/String;Lio/vertx/ext/web/handler/sockjs/impl/SockJSSession;>;Lio/vertx/ext/web/handler/sockjs/SockJSHandlerOptions;Lio/vertx/core/Handler<Lio/vertx/ext/web/handler/sockjs/SockJSSocket;>;)V
MethodParameters:
Name Flags
vertx
router
sessions
options
sockHandler
private void lambda$0(io.vertx.ext.web.handler.sockjs.SockJSHandlerOptions, io.vertx.core.Handler, io.vertx.ext.web.RoutingContext);
descriptor: (Lio/vertx/ext/web/handler/sockjs/SockJSHandlerOptions;Lio/vertx/core/Handler;Lio/vertx/ext/web/RoutingContext;)V
flags: (0x1002) ACC_PRIVATE, ACC_SYNTHETIC
Code:
stack=9, locals=8, args_size=4
start local 0 start local 3 0: getstatic io.vertx.ext.web.handler.sockjs.impl.HtmlFileTransport.log:Lio/vertx/core/logging/Logger;
invokevirtual io.vertx.core.logging.Logger.isTraceEnabled:()Z
ifeq 1
getstatic io.vertx.ext.web.handler.sockjs.impl.HtmlFileTransport.log:Lio/vertx/core/logging/Logger;
new java.lang.StringBuilder
dup
ldc "HtmlFile, get: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 3
invokeinterface io.vertx.ext.web.RoutingContext.request:()Lio/vertx/core/http/HttpServerRequest;
invokeinterface io.vertx.core.http.HttpServerRequest.uri:()Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokevirtual io.vertx.core.logging.Logger.trace:(Ljava/lang/Object;)V
1: StackMap locals:
StackMap stack:
aload 3
invokeinterface io.vertx.ext.web.RoutingContext.request:()Lio/vertx/core/http/HttpServerRequest;
ldc "callback"
invokeinterface io.vertx.core.http.HttpServerRequest.getParam:(Ljava/lang/String;)Ljava/lang/String;
astore 4
start local 4 2: aload 4
ifnonnull 7
3: aload 3
invokeinterface io.vertx.ext.web.RoutingContext.request:()Lio/vertx/core/http/HttpServerRequest;
ldc "c"
invokeinterface io.vertx.core.http.HttpServerRequest.getParam:(Ljava/lang/String;)Ljava/lang/String;
astore 4
4: aload 4
ifnonnull 7
5: aload 3
invokeinterface io.vertx.ext.web.RoutingContext.response:()Lio/vertx/core/http/HttpServerResponse;
sipush 500
invokeinterface io.vertx.core.http.HttpServerResponse.setStatusCode:(I)Lio/vertx/core/http/HttpServerResponse;
ldc "\"callback\" parameter required\n"
invokeinterface io.vertx.core.http.HttpServerResponse.end:(Ljava/lang/String;)V
6: return
7: StackMap locals: java.lang.String
StackMap stack:
getstatic io.vertx.ext.web.handler.sockjs.impl.HtmlFileTransport.CALLBACK_VALIDATION:Ljava/util/regex/Pattern;
aload 4
invokevirtual java.util.regex.Pattern.matcher:(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher;
invokevirtual java.util.regex.Matcher.find:()Z
ifeq 11
8: aload 3
invokeinterface io.vertx.ext.web.RoutingContext.response:()Lio/vertx/core/http/HttpServerResponse;
sipush 500
invokeinterface io.vertx.core.http.HttpServerResponse.setStatusCode:(I)Lio/vertx/core/http/HttpServerResponse;
pop
9: aload 3
invokeinterface io.vertx.ext.web.RoutingContext.response:()Lio/vertx/core/http/HttpServerResponse;
ldc "invalid \"callback\" parameter\n"
invokeinterface io.vertx.core.http.HttpServerResponse.end:(Ljava/lang/String;)V
10: return
11: StackMap locals:
StackMap stack:
aload 3
invokeinterface io.vertx.ext.web.RoutingContext.request:()Lio/vertx/core/http/HttpServerRequest;
astore 5
start local 5 12: aload 5
invokeinterface io.vertx.core.http.HttpServerRequest.params:()Lio/vertx/core/MultiMap;
ldc "param0"
invokeinterface io.vertx.core.MultiMap.get:(Ljava/lang/String;)Ljava/lang/String;
astore 6
start local 6 13: aload 0
aload 3
aload 1
invokevirtual io.vertx.ext.web.handler.sockjs.SockJSHandlerOptions.getSessionTimeout:()J
aload 1
invokevirtual io.vertx.ext.web.handler.sockjs.SockJSHandlerOptions.getHeartbeatInterval:()J
aload 6
aload 2
invokevirtual io.vertx.ext.web.handler.sockjs.impl.HtmlFileTransport.getSession:(Lio/vertx/ext/web/RoutingContext;JJLjava/lang/String;Lio/vertx/core/Handler;)Lio/vertx/ext/web/handler/sockjs/impl/SockJSSession;
astore 7
start local 7 14: aload 7
aload 5
new io.vertx.ext.web.handler.sockjs.impl.HtmlFileTransport$HtmlFileListener
dup
aload 0
aload 1
invokevirtual io.vertx.ext.web.handler.sockjs.SockJSHandlerOptions.getMaxBytesStreaming:()I
aload 3
aload 4
aload 7
invokespecial io.vertx.ext.web.handler.sockjs.impl.HtmlFileTransport$HtmlFileListener.<init>:(Lio/vertx/ext/web/handler/sockjs/impl/HtmlFileTransport;ILio/vertx/ext/web/RoutingContext;Ljava/lang/String;Lio/vertx/ext/web/handler/sockjs/impl/SockJSSession;)V
invokevirtual io.vertx.ext.web.handler.sockjs.impl.SockJSSession.register:(Lio/vertx/core/http/HttpServerRequest;Lio/vertx/ext/web/handler/sockjs/impl/TransportListener;)V
end local 7 end local 6 end local 5 end local 4 15: return
end local 3 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 16 0 this Lio/vertx/ext/web/handler/sockjs/impl/HtmlFileTransport;
0 16 3 rc Lio/vertx/ext/web/RoutingContext;
2 15 4 callback Ljava/lang/String;
12 15 5 req Lio/vertx/core/http/HttpServerRequest;
13 15 6 sessionID Ljava/lang/String;
14 15 7 session Lio/vertx/ext/web/handler/sockjs/impl/SockJSSession;
}
SourceFile: "HtmlFileTransport.java"
NestMembers:
io.vertx.ext.web.handler.sockjs.impl.HtmlFileTransport$HtmlFileListener
InnerClasses:
private HtmlFileListener = io.vertx.ext.web.handler.sockjs.impl.HtmlFileTransport$HtmlFileListener of io.vertx.ext.web.handler.sockjs.impl.HtmlFileTransport
public final Lookup = java.lang.invoke.MethodHandles$Lookup of java.lang.invoke.MethodHandles