public class org.glassfish.grizzly.comet.CometEngine extends java.lang.Object
{
public static final int DISABLE_SUSPEND_TIMEOUT;
public static final int DISABLE_CLIENT_DISCONNECTION_DETECTION;
public static final int BEFORE_REQUEST_PROCESSING;
public static final int AFTER_SERVLET_PROCESSING;
public static final int AFTER_RESPONSE_PROCESSING;
protected static final java.util.logging.Logger logger;
protected java.util.concurrent.ExecutorService threadPool;
private static final org.glassfish.grizzly.comet.CometEngine cometEngine;
protected final java.util.Map activeContexts;
private boolean isCometSupported;
protected void <init>()
{
java.util.concurrent.ConcurrentHashMap v;
org.glassfish.grizzly.comet.CometEngine v;
v := @this: org.glassfish.grizzly.comet.CometEngine;
specialinvoke v.<java.lang.Object: void <init>()>();
v = new java.util.concurrent.ConcurrentHashMap;
specialinvoke v.<java.util.concurrent.ConcurrentHashMap: void <init>(int,float,int)>(16, 0.75F, 64);
v.<org.glassfish.grizzly.comet.CometEngine: java.util.Map activeContexts> = v;
return;
}
protected boolean isCometEnabled()
{
org.glassfish.grizzly.comet.CometEngine v;
boolean v;
v := @this: org.glassfish.grizzly.comet.CometEngine;
v = v.<org.glassfish.grizzly.comet.CometEngine: boolean isCometSupported>;
return v;
}
public void setCometSupported(boolean)
{
org.glassfish.grizzly.comet.CometEngine v;
boolean v;
v := @this: org.glassfish.grizzly.comet.CometEngine;
v := @parameter: boolean;
v.<org.glassfish.grizzly.comet.CometEngine: boolean isCometSupported> = v;
return;
}
public static org.glassfish.grizzly.comet.CometEngine getEngine()
{
org.glassfish.grizzly.comet.CometEngine v;
v = <org.glassfish.grizzly.comet.CometEngine: org.glassfish.grizzly.comet.CometEngine cometEngine>;
return v;
}
public org.glassfish.grizzly.comet.CometContext unregister(java.lang.String)
{
org.glassfish.grizzly.comet.CometContext v;
org.glassfish.grizzly.comet.CometEngine v;
java.lang.String v;
v := @this: org.glassfish.grizzly.comet.CometEngine;
v := @parameter: java.lang.String;
v = virtualinvoke v.<org.glassfish.grizzly.comet.CometEngine: org.glassfish.grizzly.comet.CometContext deregister(java.lang.String)>(v);
return v;
}
public org.glassfish.grizzly.comet.CometContext deregister(java.lang.String)
{
java.util.Map v;
org.glassfish.grizzly.comet.CometEngine v;
java.lang.Object v;
java.lang.String v;
v := @this: org.glassfish.grizzly.comet.CometEngine;
v := @parameter: java.lang.String;
v = v.<org.glassfish.grizzly.comet.CometEngine: java.util.Map activeContexts>;
v = interfaceinvoke v.<java.util.Map: java.lang.Object remove(java.lang.Object)>(v);
if v == null goto label;
virtualinvoke v.<org.glassfish.grizzly.comet.CometContext: void recycle()>();
label:
return v;
}
public org.glassfish.grizzly.comet.CometContext register(java.lang.String, int)
{
org.glassfish.grizzly.comet.CometContext v;
int v;
org.glassfish.grizzly.comet.CometEngine v;
java.lang.String v;
v := @this: org.glassfish.grizzly.comet.CometEngine;
v := @parameter: java.lang.String;
v := @parameter: int;
v = virtualinvoke v.<org.glassfish.grizzly.comet.CometEngine: org.glassfish.grizzly.comet.CometContext register(java.lang.String)>(v);
return v;
}
public org.glassfish.grizzly.comet.CometContext register(java.lang.String)
{
org.glassfish.grizzly.comet.CometContext v;
org.glassfish.grizzly.comet.CometEngine v;
java.lang.String v;
v := @this: org.glassfish.grizzly.comet.CometEngine;
v := @parameter: java.lang.String;
v = virtualinvoke v.<org.glassfish.grizzly.comet.CometEngine: org.glassfish.grizzly.comet.CometContext register(java.lang.String,java.lang.Class)>(v, class "Lorg/glassfish/grizzly/comet/DefaultNotificationHandler;");
return v;
}
public org.glassfish.grizzly.comet.CometContext register(java.lang.String, java.lang.Class)
{
java.lang.Throwable v, v;
org.glassfish.grizzly.comet.CometContext v;
java.util.logging.Level v, v;
java.util.Map v, v, v, v;
java.lang.String v, v, v;
java.util.concurrent.ExecutorService v;
boolean v, v;
org.glassfish.grizzly.comet.CometEngine v;
org.glassfish.grizzly.comet.NotificationHandler v;
java.util.logging.Logger v, v;
java.lang.Class v;
java.lang.Object v, v;
org.glassfish.grizzly.comet.DefaultNotificationHandler v;
v := @this: org.glassfish.grizzly.comet.CometEngine;
v := @parameter: java.lang.String;
v := @parameter: java.lang.Class;
v = v.<org.glassfish.grizzly.comet.CometEngine: java.util.Map activeContexts>;
v = interfaceinvoke v.<java.util.Map: java.lang.Object get(java.lang.Object)>(v);
if v != null goto label;
v = v.<org.glassfish.grizzly.comet.CometEngine: java.util.Map activeContexts>;
entermonitor v;
label:
v = v.<org.glassfish.grizzly.comet.CometEngine: java.util.Map activeContexts>;
interfaceinvoke v.<java.util.Map: java.lang.Object get(java.lang.Object)>(v);
v = new org.glassfish.grizzly.comet.CometContext;
specialinvoke v.<org.glassfish.grizzly.comet.CometContext: void <init>(java.lang.String)>(v);
v = v;
label:
v = virtualinvoke v.<java.lang.Class: java.lang.Object newInstance()>();
label:
goto label;
label:
v := @caughtexception;
v = <org.glassfish.grizzly.comet.CometEngine: java.util.logging.Logger logger>;
v = <java.util.logging.Level: java.util.logging.Level SEVERE>;
v = virtualinvoke v.<java.util.logging.Logger: boolean isLoggable(java.util.logging.Level)>(v);
if v == 0 goto label;
v = <org.glassfish.grizzly.comet.CometEngine: java.util.logging.Logger logger>;
v = <java.util.logging.Level: java.util.logging.Level SEVERE>;
v = virtualinvoke v.<java.lang.Class: java.lang.String getName()>();
v = staticinvoke <org.glassfish.grizzly.localization.LogMessages: java.lang.String SEVERE_GRIZZLY_COMET_ENGINE_INVALID_NOTIFICATION_HANDLER_ERROR(java.lang.Object)>(v);
virtualinvoke v.<java.util.logging.Logger: void log(java.util.logging.Level,java.lang.String,java.lang.Throwable)>(v, v, v);
label:
v = new org.glassfish.grizzly.comet.DefaultNotificationHandler;
specialinvoke v.<org.glassfish.grizzly.comet.DefaultNotificationHandler: void <init>()>();
v = v;
label:
virtualinvoke v.<org.glassfish.grizzly.comet.CometContext: void setNotificationHandler(org.glassfish.grizzly.comet.NotificationHandler)>(v);
if v == null goto label;
v = v instanceof org.glassfish.grizzly.comet.DefaultNotificationHandler;
if v == 0 goto label;
v = v.<org.glassfish.grizzly.comet.CometEngine: java.util.concurrent.ExecutorService threadPool>;
virtualinvoke v.<org.glassfish.grizzly.comet.DefaultNotificationHandler: void setThreadPool(java.util.concurrent.ExecutorService)>(v);
label:
v = v.<org.glassfish.grizzly.comet.CometEngine: java.util.Map activeContexts>;
interfaceinvoke v.<java.util.Map: java.lang.Object put(java.lang.Object,java.lang.Object)>(v, v);
exitmonitor v;
label:
goto label;
label:
v := @caughtexception;
exitmonitor v;
throw v;
label:
return v;
catch java.lang.Throwable from label to label with label;
catch java.lang.Throwable from label to label with label;
}
public org.glassfish.grizzly.comet.CometContext getCometContext(java.lang.String)
{
java.util.Map v;
org.glassfish.grizzly.comet.CometEngine v;
java.lang.Object v;
java.lang.String v;
v := @this: org.glassfish.grizzly.comet.CometEngine;
v := @parameter: java.lang.String;
v = v.<org.glassfish.grizzly.comet.CometEngine: java.util.Map activeContexts>;
v = interfaceinvoke v.<java.util.Map: java.lang.Object get(java.lang.Object)>(v);
return v;
}
protected boolean interrupt(org.glassfish.grizzly.comet.CometHandler, boolean) throws java.io.IOException
{
org.glassfish.grizzly.comet.CometContext v;
org.glassfish.grizzly.comet.CometHandler v;
org.glassfish.grizzly.comet.CometEngine v;
boolean v, v;
v := @this: org.glassfish.grizzly.comet.CometEngine;
v := @parameter: org.glassfish.grizzly.comet.CometHandler;
v := @parameter: boolean;
v = interfaceinvoke v.<org.glassfish.grizzly.comet.CometHandler: org.glassfish.grizzly.comet.CometContext getCometContext()>();
v = virtualinvoke v.<org.glassfish.grizzly.comet.CometContext: boolean removeCometHandler(org.glassfish.grizzly.comet.CometHandler,boolean)>(v, v);
if v == 0 goto label;
if v != 0 goto label;
virtualinvoke v.<org.glassfish.grizzly.comet.CometEngine: void interrupt0(org.glassfish.grizzly.comet.CometHandler,boolean)>(v, v);
label:
return v;
}
protected void interrupt0(org.glassfish.grizzly.comet.CometHandler, boolean) throws java.io.IOException
{
org.glassfish.grizzly.comet.CometContext v;
org.glassfish.grizzly.comet.CometEvent v;
org.glassfish.grizzly.comet.CometHandler v;
org.glassfish.grizzly.comet.CometEngine v;
java.io.IOException v;
org.glassfish.grizzly.http.server.Response v;
boolean v;
v := @this: org.glassfish.grizzly.comet.CometEngine;
v := @parameter: org.glassfish.grizzly.comet.CometHandler;
v := @parameter: boolean;
if v == 0 goto label;
label:
v = interfaceinvoke v.<org.glassfish.grizzly.comet.CometHandler: org.glassfish.grizzly.comet.CometContext getCometContext()>();
v = v.<org.glassfish.grizzly.comet.CometContext: org.glassfish.grizzly.comet.CometEvent eventInterrupt>;
interfaceinvoke v.<org.glassfish.grizzly.comet.CometHandler: void onInterrupt(org.glassfish.grizzly.comet.CometEvent)>(v);
label:
goto label;
label:
v := @caughtexception;
label:
v = interfaceinvoke v.<org.glassfish.grizzly.comet.CometHandler: org.glassfish.grizzly.http.server.Response getResponse()>();
virtualinvoke v.<org.glassfish.grizzly.http.server.Response: void finish()>();
return;
catch java.io.IOException from label to label with label;
}
public static java.util.logging.Logger logger()
{
java.util.logging.Logger v;
v = <org.glassfish.grizzly.comet.CometEngine: java.util.logging.Logger logger>;
return v;
}
static void <clinit>()
{
org.glassfish.grizzly.comet.CometEngine v;
java.lang.Class v;
java.lang.String v;
java.util.logging.Logger v;
v = class "Lorg/glassfish/grizzly/comet/CometEngine;";
v = virtualinvoke v.<java.lang.Class: java.lang.String getName()>();
v = staticinvoke <java.util.logging.Logger: java.util.logging.Logger getLogger(java.lang.String)>(v);
<org.glassfish.grizzly.comet.CometEngine: java.util.logging.Logger logger> = v;
v = new org.glassfish.grizzly.comet.CometEngine;
specialinvoke v.<org.glassfish.grizzly.comet.CometEngine: void <init>()>();
<org.glassfish.grizzly.comet.CometEngine: org.glassfish.grizzly.comet.CometEngine cometEngine> = v;
return;
}
}