Skip to Content.
Sympa Menu

notify-dpml - svn commit: r2803 - development/main/depot/station/src/main/net/dpml/depot/station

notify-dpml AT lists.ibiblio.org

Subject: DPML Notify

List archive

Chronological Thread  
  • From: mcconnell AT dpml.net
  • To: notify-dpml AT lists.ibiblio.org
  • Subject: svn commit: r2803 - development/main/depot/station/src/main/net/dpml/depot/station
  • Date: Wed, 08 Jun 2005 20:42:41 -0400

Author: mcconnell AT dpml.net
Date: Wed Jun 8 20:42:39 2005
New Revision: 2803

Added:

development/main/depot/station/src/main/net/dpml/depot/station/ActivationProfile.java
Log:
initial activation profile

Added:
development/main/depot/station/src/main/net/dpml/depot/station/ActivationProfile.java
==============================================================================
--- (empty file)
+++
development/main/depot/station/src/main/net/dpml/depot/station/ActivationProfile.java
Wed Jun 8 20:42:39 2005
@@ -0,0 +1,98 @@
+/*
+ * Copyright 2005 Stephen McConnell
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ * implied.
+ *
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package net.dpml.depot.station;
+
+import java.net.URI;
+import java.util.Date;
+import java.util.Properties;
+import java.rmi.activation.ActivationDesc;
+import java.rmi.activation.ActivationGroupID;
+import java.rmi.activation.ActivationException;
+
+import net.dpml.transit.model.Logger;
+import net.dpml.transit.management.Home;
+
+import net.dpml.depot.profile.ProfileException;
+import net.dpml.depot.profile.PluginProfile;
+
+/**
+ * A ActivationProfile maintains information about the configuration
+ * of an activation profile.
+ */
+public class ActivationProfile extends PluginProfile
+{
+ private String m_classname;
+ private ActivationGroupID m_group;
+ private boolean m_restart;
+ private ActivationDesc m_descriptor;
+
+ public ActivationProfile(
+ Logger logger, Date creation, Home home, String id, String title,
+ Properties properties, boolean command, Connection connection, URI
uri,
+ ActivationGroupID group, String classname, boolean restart )
+ throws ProfileException
+ {
+ super( logger, creation, home, id, title, properties, command,
connection, uri );
+
+ m_group = group;
+ String location = uri.toASCIIString();
+ if( null == group )
+ {
+ try
+ {
+ m_descriptor = new ActivationDesc( classname, location,
null, restart );
+ }
+ catch( ActivationException e )
+ {
+ final String error =
+ "Cannot create activation profile [" + id + "].";
+ throw new ProfileException( error, e );
+ }
+ }
+ else
+ {
+ m_descriptor = new ActivationDesc( group, classname, location,
null, restart );
+ }
+ }
+
+ public String getClassname()
+ {
+ return m_classname;
+ }
+
+ public void setClassname( String classname )
+ {
+ m_classname = classname;
+ }
+
+ public boolean getRestartPolicy()
+ {
+ return m_restart;
+ }
+
+ public void setResartPolicy( boolean policy )
+ {
+ m_restart = policy;
+ }
+
+ public ActivationDesc getActivationDesc()
+ {
+ return m_descriptor;
+ }
+}



  • svn commit: r2803 - development/main/depot/station/src/main/net/dpml/depot/station, mcconnell, 06/08/2005

Archive powered by MHonArc 2.6.24.

Top of Page