From 3f92a2dc5da78ca29e6ed5ed2e2f1e2670e79989 Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Fri, 13 Aug 2004 01:41:17 +0000 Subject: [PATCH] hook in windows service extension for testing --- .../src/net/hyperic/sigar/ptql/ProcessQueryFactory.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bindings/java/src/net/hyperic/sigar/ptql/ProcessQueryFactory.java b/bindings/java/src/net/hyperic/sigar/ptql/ProcessQueryFactory.java index 41b3bd44..514b5400 100644 --- a/bindings/java/src/net/hyperic/sigar/ptql/ProcessQueryFactory.java +++ b/bindings/java/src/net/hyperic/sigar/ptql/ProcessQueryFactory.java @@ -116,6 +116,9 @@ public class ProcessQueryFactory implements Comparator { if (branch.attr.equals("PidFile")) { return new PidFileQuery(val); } + else if (branch.attr.equals("Service")) { + return new WindowsServiceQuery(val); + } throw new MalformedQueryException("Unsupported method: " + branch.attr); @@ -146,7 +149,9 @@ public class ProcessQueryFactory implements Comparator { return pQuery; } - if (query.startsWith("Pid.PidFile.")) { + if (query.startsWith("Pid.PidFile.") || + query.startsWith("Pid.Service.")) + { pQuery = getPidInstance(query); cache.put(query, pQuery); return pQuery;