org.cybergarage.util.Debug类的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(5.5k)|赞(0)|评价(0)|浏览(182)

本文整理了Java中org.cybergarage.util.Debug类的一些代码示例,展示了Debug类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Debug类的具体详情如下:
包路径:org.cybergarage.util.Debug
类名称:Debug

Debug介绍

暂无

代码示例

代码示例来源:origin: i2p/i2p.i2p

public synchronized void lock()
{
  while(syncLock == true) {
    try {
      wait();
    }
    catch (Exception e) {
      Debug.warning(e);
    };
  }
  syncLock = true;
}

代码示例来源:origin: i2p/i2p.i2p

public void print()
  {
    Debug.message(toString());
  }
}

代码示例来源:origin: i2p/i2p.i2p

public void run()
{
  if (isOpened() == false)
    return;
    
  Thread thisThread = Thread.currentThread();
  
  while (httpServerThread == thisThread) {
    Thread.yield();
    Socket sock;
    try {
      Debug.message("accept ...");
      sock = accept();
      if (sock != null)
        Debug.message("sock = " + sock.getRemoteSocketAddress());
    }
    catch (Exception e){
      Debug.warning(e);
      break;
    }
    HTTPServerThread httpServThread = new HTTPServerThread(this, sock);
    httpServThread.start(); 
    Debug.message("httpServThread ...");
  }
}

代码示例来源:origin: i2p/i2p.i2p

public boolean subscribe(Service service, String uuid, long timeout)
{
  SubscriptionRequest subReq = new SubscriptionRequest();
  subReq.setRenewRequest(service, uuid, timeout);
  if (Debug.isOn() == true)
    subReq.print();    
  SubscriptionResponse subRes = subReq.post();
  if (Debug.isOn() == true)
    subRes.print();    
  if (subRes.isSuccessful() == true) {
    service.setSID(subRes.getSID());
    service.setTimeout(subRes.getTimeout());
    return true;
  }
  service.clearSID();
  return false;
}

代码示例来源:origin: geniusgithub/MediaPlayer

public static final void warning(Exception e) {
    warning(e.getMessage());
    e.printStackTrace(Debug.debug.getOut());
  }
}

代码示例来源:origin: cybergarage/cybergarage-upnp

public static void main(String args[]) 
  {
    //Debug.on();
    for (int n=0; n<args.length; n++) {
      String opt = args[n];
      if (opt.equals("-v") || opt.equals("--verbose")) {
        Debug.on();
        Debug.message("Debug.on");
			}
    }
    
    CtrlPoint ctrlPoint = new CtrlPoint();
    ctrlPoint.start();
  }

}

代码示例来源:origin: cybergarage/cybergarage-upnp

public static void main(String args[])
{
  Debug.off();
  boolean need_gui = true;
  int mode = FILESYS_MODE;
  Debug.message("args = " + args.length);
  for (int n=0; n<args.length; n++) {
    Debug.message("  [" + n + "] = " + args[n]);
    if (MYTHTV_OPT_STRING.compareTo(args[n]) == 0)
      mode = MYTHTV_MODE;
    if (MYTHTV_OPT_STRING_OLD.compareTo(args[n]) == 0)
      mode = MYTHTV_MODE;
    if (VERBOSE_OPT_STRING.compareTo(args[n]) == 0)
      Debug.on();
    if (CONSOLE_OPT_STRING.compareTo(args[n]) == 0)
      need_gui = false;
  }
  MediaGate mediaGate = new MediaGate(mode, need_gui);
  debug(mediaGate);
  mediaGate.start();
}

代码示例来源:origin: apache/felix

public void setCyberDebug(String value){
  try {
    if (Boolean.valueOf(value).booleanValue()){
      Debug.on();
      out.println("INFO [UPnPBaseDriver] Started CyberLink Debug");
    }
  } catch (Exception ex){
    out.println("WARNING [UPnPBaseDriver CyberLog]: " + value +" is not a valid value!");
  }
}

代码示例来源:origin: org.apache.felix/org.apache.felix.upnp.basedriver

public void setCyberDebug(boolean value){
  if (value) Debug.on();
  else Debug.off();
}

代码示例来源:origin: cybergarage/cybergarage-upnp

public static final void message(String m1, String m2) {
  if (enabled == true)
    Debug.debug.getOut().println("CyberGarage message : ");
    Debug.debug.getOut().println(m1);
    Debug.debug.getOut().println(m2);
}
public static final void warning(String s) {

代码示例来源:origin: i2p/i2p.i2p

public boolean postQuerylAction()
{
  QueryRequest queryReq = new QueryRequest();
  queryReq.setRequest(this);
  if (Debug.isOn() == true)
    queryReq.print();
  QueryResponse queryRes = queryReq.post();
  if (Debug.isOn() == true)
    queryRes.print();
  setQueryResponse(queryRes);
  // Thanks for Dimas <cyberrate@users.sourceforge.net> and Stefano Lenzi <kismet-sl@users.sourceforge.net> (07/09/04)
  if (queryRes.isSuccessful() == false) {
    setValue(queryRes.getReturnValue());
    return false;
  }
  setValue(queryRes.getReturnValue());
  return true;
}

代码示例来源:origin: cybergarage/cybergarage-upnp

public static final void warning(Exception e) {
    warning(e.getMessage());
    e.printStackTrace(Debug.debug.getOut());
  }
}

代码示例来源:origin: cybergarage/cybergarage-upnp

public static void main(String args[]) 
  {
    //Debug.on();
    for (int n=0; n<args.length; n++) {
      String opt = args[n];
      if (opt.equals("-v") || opt.equals("--verbose")) {
        Debug.on();
        Debug.message("Debug.on");
			}
    }
    
    UpnpIGDTool igdtool = new UpnpIGDTool();
    igdtool.start();
  }

}

代码示例来源:origin: org.apache.felix/org.apache.felix.upnp.basedriver

public void setCyberDebug(String value){
  try {
    if (Boolean.valueOf(value).booleanValue()){
      Debug.on();
      out.println("INFO [UPnPBaseDriver] Started CyberLink Debug");
    }
  } catch (Exception ex){
    out.println("WARNING [UPnPBaseDriver CyberLog]: " + value +" is not a valid value!");
  }
}

代码示例来源:origin: apache/felix

public void setCyberDebug(boolean value){
  if (value) Debug.on();
  else Debug.off();
}

代码示例来源:origin: geniusgithub/MediaPlayer

public static final void message(String s) {
  if (enabled == true)
    Debug.debug.getOut().println("CyberGarage message : " + s);
}
public static final void message(String m1, String m2) {

代码示例来源:origin: i2p/i2p.i2p

public final static int toInteger(String value)
{
  try {
    return Integer.parseInt(value);
  }
  catch (Exception e) {
    Debug.warning(e);
  }
  return 0;
}

代码示例来源:origin: i2p/i2p.i2p

public void print()
  {
    Debug.message(toString());
  }
}

代码示例来源:origin: i2p/i2p.i2p

private void deviceQueryControlRecieved(QueryRequest ctlReq, Service service) {
  if (Debug.isOn() == true)
    ctlReq.print();
  String varName = ctlReq.getVarName();
  if (service.hasStateVariable(varName) == false) {
    invalidActionControlRecieved(ctlReq);
    return;
  }
  StateVariable stateVar = getStateVariable(varName);
  if (stateVar.performQueryListener(ctlReq) == false)
    invalidActionControlRecieved(ctlReq);
}

代码示例来源:origin: cybergarage/cybergarage-upnp

public static void main(String args[]) 
{
  Debug.on();
  MythDirectory mythdir = new MythDirectory();
  mythdir.update();
}

相关文章