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

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

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

Debug介绍

暂无

代码示例

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

  1. public synchronized void lock()
  2. {
  3. while(syncLock == true) {
  4. try {
  5. wait();
  6. }
  7. catch (Exception e) {
  8. Debug.warning(e);
  9. };
  10. }
  11. syncLock = true;
  12. }

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

  1. public void print()
  2. {
  3. Debug.message(toString());
  4. }
  5. }

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

  1. public void run()
  2. {
  3. if (isOpened() == false)
  4. return;
  5. Thread thisThread = Thread.currentThread();
  6. while (httpServerThread == thisThread) {
  7. Thread.yield();
  8. Socket sock;
  9. try {
  10. Debug.message("accept ...");
  11. sock = accept();
  12. if (sock != null)
  13. Debug.message("sock = " + sock.getRemoteSocketAddress());
  14. }
  15. catch (Exception e){
  16. Debug.warning(e);
  17. break;
  18. }
  19. HTTPServerThread httpServThread = new HTTPServerThread(this, sock);
  20. httpServThread.start();
  21. Debug.message("httpServThread ...");
  22. }
  23. }

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

  1. public boolean subscribe(Service service, String uuid, long timeout)
  2. {
  3. SubscriptionRequest subReq = new SubscriptionRequest();
  4. subReq.setRenewRequest(service, uuid, timeout);
  5. if (Debug.isOn() == true)
  6. subReq.print();
  7. SubscriptionResponse subRes = subReq.post();
  8. if (Debug.isOn() == true)
  9. subRes.print();
  10. if (subRes.isSuccessful() == true) {
  11. service.setSID(subRes.getSID());
  12. service.setTimeout(subRes.getTimeout());
  13. return true;
  14. }
  15. service.clearSID();
  16. return false;
  17. }

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

  1. public static final void warning(Exception e) {
  2. warning(e.getMessage());
  3. e.printStackTrace(Debug.debug.getOut());
  4. }
  5. }

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

  1. public static void main(String args[])
  2. {
  3. //Debug.on();
  4. for (int n=0; n<args.length; n++) {
  5. String opt = args[n];
  6. if (opt.equals("-v") || opt.equals("--verbose")) {
  7. Debug.on();
  8. Debug.message("Debug.on");
  9. }
  10. }
  11. CtrlPoint ctrlPoint = new CtrlPoint();
  12. ctrlPoint.start();
  13. }
  14. }

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

  1. public static void main(String args[])
  2. {
  3. Debug.off();
  4. boolean need_gui = true;
  5. int mode = FILESYS_MODE;
  6. Debug.message("args = " + args.length);
  7. for (int n=0; n<args.length; n++) {
  8. Debug.message(" [" + n + "] = " + args[n]);
  9. if (MYTHTV_OPT_STRING.compareTo(args[n]) == 0)
  10. mode = MYTHTV_MODE;
  11. if (MYTHTV_OPT_STRING_OLD.compareTo(args[n]) == 0)
  12. mode = MYTHTV_MODE;
  13. if (VERBOSE_OPT_STRING.compareTo(args[n]) == 0)
  14. Debug.on();
  15. if (CONSOLE_OPT_STRING.compareTo(args[n]) == 0)
  16. need_gui = false;
  17. }
  18. MediaGate mediaGate = new MediaGate(mode, need_gui);
  19. debug(mediaGate);
  20. mediaGate.start();
  21. }

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

  1. public void setCyberDebug(String value){
  2. try {
  3. if (Boolean.valueOf(value).booleanValue()){
  4. Debug.on();
  5. out.println("INFO [UPnPBaseDriver] Started CyberLink Debug");
  6. }
  7. } catch (Exception ex){
  8. out.println("WARNING [UPnPBaseDriver CyberLog]: " + value +" is not a valid value!");
  9. }
  10. }

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

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

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

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

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

  1. public boolean postQuerylAction()
  2. {
  3. QueryRequest queryReq = new QueryRequest();
  4. queryReq.setRequest(this);
  5. if (Debug.isOn() == true)
  6. queryReq.print();
  7. QueryResponse queryRes = queryReq.post();
  8. if (Debug.isOn() == true)
  9. queryRes.print();
  10. setQueryResponse(queryRes);
  11. // Thanks for Dimas <cyberrate@users.sourceforge.net> and Stefano Lenzi <kismet-sl@users.sourceforge.net> (07/09/04)
  12. if (queryRes.isSuccessful() == false) {
  13. setValue(queryRes.getReturnValue());
  14. return false;
  15. }
  16. setValue(queryRes.getReturnValue());
  17. return true;
  18. }

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

  1. public static final void warning(Exception e) {
  2. warning(e.getMessage());
  3. e.printStackTrace(Debug.debug.getOut());
  4. }
  5. }

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

  1. public static void main(String args[])
  2. {
  3. //Debug.on();
  4. for (int n=0; n<args.length; n++) {
  5. String opt = args[n];
  6. if (opt.equals("-v") || opt.equals("--verbose")) {
  7. Debug.on();
  8. Debug.message("Debug.on");
  9. }
  10. }
  11. UpnpIGDTool igdtool = new UpnpIGDTool();
  12. igdtool.start();
  13. }
  14. }

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

  1. public void setCyberDebug(String value){
  2. try {
  3. if (Boolean.valueOf(value).booleanValue()){
  4. Debug.on();
  5. out.println("INFO [UPnPBaseDriver] Started CyberLink Debug");
  6. }
  7. } catch (Exception ex){
  8. out.println("WARNING [UPnPBaseDriver CyberLog]: " + value +" is not a valid value!");
  9. }
  10. }

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

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

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

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

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

  1. public final static int toInteger(String value)
  2. {
  3. try {
  4. return Integer.parseInt(value);
  5. }
  6. catch (Exception e) {
  7. Debug.warning(e);
  8. }
  9. return 0;
  10. }

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

  1. public void print()
  2. {
  3. Debug.message(toString());
  4. }
  5. }

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

  1. private void deviceQueryControlRecieved(QueryRequest ctlReq, Service service) {
  2. if (Debug.isOn() == true)
  3. ctlReq.print();
  4. String varName = ctlReq.getVarName();
  5. if (service.hasStateVariable(varName) == false) {
  6. invalidActionControlRecieved(ctlReq);
  7. return;
  8. }
  9. StateVariable stateVar = getStateVariable(varName);
  10. if (stateVar.performQueryListener(ctlReq) == false)
  11. invalidActionControlRecieved(ctlReq);
  12. }

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

  1. public static void main(String args[])
  2. {
  3. Debug.on();
  4. MythDirectory mythdir = new MythDirectory();
  5. mythdir.update();
  6. }

相关文章