[jboss-cvs] JBossAS SVN: r99343 - projects/kernel/trunk/dependency/src/main/java/org/jboss/dependency/plugins/tracker.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Jan 13 09:51:43 EST 2010
Author: alesj
Date: 2010-01-13 09:51:43 -0500 (Wed, 13 Jan 2010)
New Revision: 99343
Added:
projects/kernel/trunk/dependency/src/main/java/org/jboss/dependency/plugins/tracker/NoopContextTracker.java
Modified:
projects/kernel/trunk/dependency/src/main/java/org/jboss/dependency/plugins/tracker/TrackerConstants.java
Log:
Break noop out from constants, so we can use it in AS.
Added: projects/kernel/trunk/dependency/src/main/java/org/jboss/dependency/plugins/tracker/NoopContextTracker.java
===================================================================
--- projects/kernel/trunk/dependency/src/main/java/org/jboss/dependency/plugins/tracker/NoopContextTracker.java (rev 0)
+++ projects/kernel/trunk/dependency/src/main/java/org/jboss/dependency/plugins/tracker/NoopContextTracker.java 2010-01-13 14:51:43 UTC (rev 99343)
@@ -0,0 +1,72 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.dependency.plugins.tracker;
+
+import java.util.Collections;
+import java.util.Set;
+
+import org.jboss.dependency.spi.ControllerContext;
+import org.jboss.dependency.spi.tracker.ContextTracker;
+
+/**
+ * Noop context tracker.
+ *
+ * @author <a href="mailto:ales.justin at jboss.org">Ales Justin</a>
+ */
+public class NoopContextTracker implements ContextTracker
+{
+ public int getUsedByCount(ControllerContext used, Object user)
+ {
+ return 0;
+ }
+
+ public void addUsedBy(ControllerContext used, Object user)
+ {
+ }
+
+ public void incrementUsedBy(ControllerContext used, Object user)
+ {
+ }
+
+ public void decrementUsedBy(ControllerContext used, Object user)
+ {
+ }
+
+ public void removeUsedBy(ControllerContext used, Object user)
+ {
+ }
+
+ public boolean isContextInUse(ControllerContext used)
+ {
+ return false;
+ }
+
+ public Set<Object> getUsers(ControllerContext used)
+ {
+ return Collections.emptySet();
+ }
+
+ public Set<ControllerContext> getUsedContexts(Object user)
+ {
+ return Collections.emptySet();
+ }
+}
Modified: projects/kernel/trunk/dependency/src/main/java/org/jboss/dependency/plugins/tracker/TrackerConstants.java
===================================================================
--- projects/kernel/trunk/dependency/src/main/java/org/jboss/dependency/plugins/tracker/TrackerConstants.java 2010-01-13 14:42:24 UTC (rev 99342)
+++ projects/kernel/trunk/dependency/src/main/java/org/jboss/dependency/plugins/tracker/TrackerConstants.java 2010-01-13 14:51:43 UTC (rev 99343)
@@ -21,10 +21,6 @@
*/
package org.jboss.dependency.plugins.tracker;
-import java.util.Collections;
-import java.util.Set;
-
-import org.jboss.dependency.spi.ControllerContext;
import org.jboss.dependency.spi.tracker.ContextTracker;
/**
@@ -40,42 +36,5 @@
}
/** Dummy noop anchor tracker */
- public static final ContextTracker NOOP = new ContextTracker()
- {
- public int getUsedByCount(ControllerContext used, Object user)
- {
- return 0;
- }
-
- public void addUsedBy(ControllerContext used, Object user)
- {
- }
-
- public void incrementUsedBy(ControllerContext used, Object user)
- {
- }
-
- public void decrementUsedBy(ControllerContext used, Object user)
- {
- }
-
- public void removeUsedBy(ControllerContext used, Object user)
- {
- }
-
- public boolean isContextInUse(ControllerContext used)
- {
- return false;
- }
-
- public Set<Object> getUsers(ControllerContext used)
- {
- return Collections.emptySet();
- }
-
- public Set<ControllerContext> getUsedContexts(Object user)
- {
- return Collections.emptySet();
- }
- };
+ public static final ContextTracker NOOP = new NoopContextTracker();
}
More information about the jboss-cvs-commits
mailing list