Author: rhauch
Date: 2008-05-29 15:18:34 -0400 (Thu, 29 May 2008)
New Revision: 210
Added:
branches/federation/dna-repository/src/main/java/org/jboss/dna/repository/FederationService.java
Modified:
branches/federation/dna-repository/src/main/java/org/jboss/dna/repository/RepositoryI18n.java
branches/federation/dna-repository/src/main/resources/org/jboss/dna/repository/RepositoryI18n.properties
Log:
Added FederationService.
Added:
branches/federation/dna-repository/src/main/java/org/jboss/dna/repository/FederationService.java
===================================================================
---
branches/federation/dna-repository/src/main/java/org/jboss/dna/repository/FederationService.java
(rev 0)
+++
branches/federation/dna-repository/src/main/java/org/jboss/dna/repository/FederationService.java 2008-05-29
19:18:34 UTC (rev 210)
@@ -0,0 +1,83 @@
+/*
+ * 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.dna.repository;
+
+import java.util.concurrent.TimeUnit;
+import org.jboss.dna.common.util.ArgCheck;
+import org.jboss.dna.repository.services.AbstractServiceAdministrator;
+import org.jboss.dna.repository.services.AdministeredService;
+import org.jboss.dna.repository.services.ServiceAdministrator;
+import org.jboss.dna.spi.graph.connection.RepositorySource;
+
+/**
+ * @author Randall Hauch
+ */
+public class FederationService implements AdministeredService {
+
+ /**
+ * The administrative component for this service.
+ * @author Randall Hauch
+ */
+ protected class Administrator extends AbstractServiceAdministrator {
+
+ protected Administrator() {
+ super(RepositoryI18n.federationServiceName, State.STARTED);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean awaitTermination( long timeout, TimeUnit unit ) {
+ return true;
+ }
+
+ }
+
+ private RepositorySource bootstrapSource;
+ private final Administrator administrator = new Administrator();
+
+ /**
+ * Create a federation service instance
+ * @param bootstrapSource the repository source that should be used to bootstrap the
federation service
+ * @throws IllegalArgumentException if the bootstrap source is null
+ */
+ public FederationService( RepositorySource bootstrapSource ) {
+ ArgCheck.isNotNull(bootstrapSource, "bootstrapSource");
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public ServiceAdministrator getAdministrator() {
+ return this.administrator;
+ }
+
+ /**
+ * Get the repository source used to obtain connections to the repository containing
the configuration information for this
+ * federation service.
+ * @return bootstrapSource
+ */
+ public RepositorySource getBootstrapSource() {
+ return this.bootstrapSource;
+ }
+
+}
Property changes on:
branches/federation/dna-repository/src/main/java/org/jboss/dna/repository/FederationService.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified:
branches/federation/dna-repository/src/main/java/org/jboss/dna/repository/RepositoryI18n.java
===================================================================
---
branches/federation/dna-repository/src/main/java/org/jboss/dna/repository/RepositoryI18n.java 2008-05-28
17:33:20 UTC (rev 209)
+++
branches/federation/dna-repository/src/main/java/org/jboss/dna/repository/RepositoryI18n.java 2008-05-29
19:18:34 UTC (rev 210)
@@ -60,6 +60,7 @@
public static I18n errorObtainingSessionToRepositoryWorkspace;
public static I18n errorWritingProblemsOnRuleSet;
+ public static I18n federationServiceName;
public static I18n observationServiceName;
public static I18n ruleServiceName;
Modified:
branches/federation/dna-repository/src/main/resources/org/jboss/dna/repository/RepositoryI18n.properties
===================================================================
---
branches/federation/dna-repository/src/main/resources/org/jboss/dna/repository/RepositoryI18n.properties 2008-05-28
17:33:20 UTC (rev 209)
+++
branches/federation/dna-repository/src/main/resources/org/jboss/dna/repository/RepositoryI18n.properties 2008-05-29
19:18:34 UTC (rev 210)
@@ -28,7 +28,8 @@
errorObtainingSessionToRepositoryWorkspace = Error obtaining JCR session to repository
workspace {0}
errorWritingProblemsOnRuleSet = Error while writing problems on rule set node {0}
-observationServiceName = Observation Service;
+federationServiceName = Federation Service
+observationServiceName = Observation Service
ruleServiceName = Rule Service
sequencingServiceName = Sequencing Service