You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@synapse.apache.org by pz...@apache.org on 2007/08/07 19:05:55 UTC
svn commit: r563561 -
/webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/StartupFinder.java
Author: pzf
Date: Tue Aug 7 10:05:54 2007
New Revision: 563561
URL: http://svn.apache.org/viewvc?view=rev&rev=563561
Log:
tiny update
Modified:
webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/StartupFinder.java
Modified: webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/StartupFinder.java
URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/StartupFinder.java?view=diff&rev=563561&r1=563560&r2=563561
==============================================================================
--- webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/StartupFinder.java (original)
+++ webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/StartupFinder.java Tue Aug 7 10:05:54 2007
@@ -44,28 +44,28 @@
instance = null;
}
- private static final Class[] builtins = { SimpleQuartzFactory.class};
-
+ private static final Class[] builtins = { SimpleQuartzFactory.class };
+
private StartupFinder() {
// preregister any built in
- for (int i=0; i<builtins.length;i++) {
+ for (int i = 0; i < builtins.length; i++) {
Class b = builtins[i];
StartupFactory sf;
try {
- sf = (StartupFactory)b.newInstance();
+ sf = (StartupFactory) b.newInstance();
} catch (Exception e) {
- throw new SynapseException("cannot instantiate "+b.getName(),e);
-
+ throw new SynapseException("cannot instantiate " + b.getName(),
+ e);
+
}
factoryMap.put(sf.getTagQName(), b);
- serializerMap.put(sf.getTagQName(),sf.getSerializerClass());
-
+ serializerMap.put(sf.getTagQName(), sf.getSerializerClass());
+
}
-
+
registerExtensions();
}
-
private void handleException(String msg) {
log.error(msg);
throw new SynapseException(msg);
@@ -143,15 +143,20 @@
}
}
- /**
- * This method will serialize the config using the supplied QName (looking
+ /**
+ * This method will serialize the config using the supplied QName (looking
* up the right class to do it)
- *
- * @param parent - Parent OMElement to which the created element will be added if not null
- * @param startup - Startup to be serialized
- * @throws XMLStreamException if the serialization encounter an error
- */
- public void serializeStartup(OMElement parent, Startup startup) throws XMLStreamException {
+ *
+ * @param parent -
+ * Parent OMElement to which the created element will be added if
+ * not null
+ * @param startup -
+ * Startup to be serialized
+ * @throws XMLStreamException
+ * if the serialization encounter an error
+ */
+ public void serializeStartup(OMElement parent, Startup startup)
+ throws XMLStreamException {
Class cls = (Class) serializerMap.get(startup.getTagQName());
if (cls == null) {
@@ -163,7 +168,7 @@
try {
StartupSerializer ss = (StartupSerializer) cls.newInstance();
- ss.serializeStartup(parent, startup);
+ ss.serializeStartup(parent, startup);
} catch (InstantiationException e) {
String msg = "Error initializing startup serializer: " + cls;
---------------------------------------------------------------------
To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: synapse-dev-help@ws.apache.org