📄 jarm.java
字号:
// Decompiled by Jad v1.5.8e2. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://kpdus.tripod.com/jad.html
// Decompiler options: packimports(3)
// Source File Name: Jarm.java
package com.sap.mw.jco.util;
import com.sap.mw.jco.JCO;
import com.sap.util.monitor.jarm.IMonitor;
import com.sap.util.monitor.jarm.TaskMonitor;
public class Jarm
{
public static class Monitor
{
public void setUser(String user)
{
monitor.setUser(user);
}
public void startComponent(String name)
{
currentComponent = name;
monitor.startComponent(name);
}
public void compAction(String compName, String action)
{
monitor.compAction(compName, action);
}
public void compAction(String action)
{
monitor.compAction(reqName, action);
}
public void endComponent(String name)
{
monitor.endComponent(name);
}
public void startComponent()
{
monitor.startComponent(reqName);
}
public void endComponent()
{
if(currentComponent == null)
{
monitor.endComponent(reqName);
} else
{
endComponent(currentComponent);
currentComponent = null;
}
}
public void endRequest()
{
monitor.endRequest(reqName);
}
private IMonitor monitor;
private String reqName;
private String currentComponent;
protected Monitor(IMonitor monitor, String reqName)
{
this.reqName = null;
currentComponent = null;
this.reqName = reqName;
this.monitor = monitor;
}
}
public Jarm()
{
}
public static boolean setState(String value)
{
if(value == null)
return false;
if("1".equals(value))
{
if(!isInClasspath())
throw new com.sap.mw.jco.JCO.Exception(155, "JCO_ERROR_JARM_LOAD_ERROR", "jARM library not found in CLASSPATH. Please check CLASSPATH.");
else
return true;
} else
{
jarm_state = 0;
return false;
}
}
public static boolean isInClasspath()
{
if((jarm_state & 1) == 0)
try
{
Class.forName("com.sap.util.monitor.jarm.IMonitor");
jarm_state |= 2;
}
catch(Exception ex) { }
finally
{
jarm_state |= 1;
}
return (jarm_state & 2) != 0;
}
public static Monitor getRequestMonitor(String user, String reqName)
{
if((jarm_state & 1) != 0)
return new Monitor(TaskMonitor.getRequestMonitor(user, reqName), reqName);
else
return null;
}
private static final byte ON = 1;
private static final byte IN_CLASSPATH = 2;
private static byte jarm_state = 0;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -