⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 xmlblastercallback.java

📁 java开源的企业总线.xmlBlaster
💻 JAVA
字号:
/*------------------------------------------------------------------------------Name:      XmlBlasterCallback.javaProject:   xmlBlaster.orgCopyright: xmlBlaster.org, see xmlBlaster-LICENSE file------------------------------------------------------------------------------*/package org.xmlBlaster.client.jmx;import java.rmi.RemoteException;import org.xmlBlaster.util.admin.extern.MethodInvocation;import org.xmlBlaster.util.admin.extern.XmlBlasterConnector;import org.xmlBlaster.util.Global;import java.util.logging.Logger;import java.util.logging.Level;public class XmlBlasterCallback implements Callback{  private int status = XmlBlasterConnector.UNKNOWN;  private static String ME = "XmlBlasterCallback";  private String ID = null;  private MethodInvocation mi = null;  private Global glob;   private static Logger log = Logger.getLogger(XmlBlasterCallback.class.getName());  XmlBlasterCallback(String ID, MethodInvocation mi) {    status = XmlBlasterConnector.SENDING;    this.ID = ID;    this.mi = mi;    this.glob = Global.instance();  }  protected void setMethodInvocation(MethodInvocation mi) {    synchronized (this) {      if (log.isLoggable(Level.FINER)) this.log.finer("setMethodInvocation for " + mi.getMethodName());      this.mi = mi;      status = XmlBlasterConnector.FINISHED;      notifyAll();    }  }  public int peek() {    return status;  }  public Object get() throws RemoteException {    synchronized (this) {      if (log.isLoggable(Level.FINER)) this.log.finer("get");      while (status != XmlBlasterConnector.FINISHED) {        try {          wait();        }        catch (InterruptedException e) {}        }      }      return mi.getReturnValue();    }  }

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -