Author: jmarino
Date: Fri Jan 5 03:13:44 2007
New Revision: 492981
URL: http://svn.apache.org/viewvc?view=rev&rev=492981
Log:
checkstyle cleanup
Modified:
incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/builder/WiringExceptionFormatter.java
incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/loader/LoaderExceptionFormatter.java
incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/services/management/jmx/JmxManagementService.java
incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/services/management/jmx/instrument/InstrumentedComponent.java
incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/services/management/jmx/runtime/JmxRuntimeInfo.java
incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/services/management/jmx/runtime/JmxRuntimeInfoImpl.java
incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/wire/IncompatibleServiceContractExceptionFormatterTestCase.java
incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/extension/CompositeComponentExtension.java
Modified:
incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/builder/WiringExceptionFormatter.java
URL:
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/builder/WiringExceptionFormatter.java?view=diff&rev=492981&r1=492980&r2=492981
==============================================================================
---
incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/builder/WiringExceptionFormatter.java
(original)
+++
incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/builder/WiringExceptionFormatter.java
Fri Jan 5 03:13:44 2007
@@ -20,7 +20,6 @@
import java.io.PrintWriter;
-import org.osoa.sca.annotations.Constructor;
import org.osoa.sca.annotations.Destroy;
import org.osoa.sca.annotations.EagerInit;
Modified:
incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/loader/LoaderExceptionFormatter.java
URL:
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/loader/LoaderExceptionFormatter.java?view=diff&rev=492981&r1=492980&r2=492981
==============================================================================
---
incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/loader/LoaderExceptionFormatter.java
(original)
+++
incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/loader/LoaderExceptionFormatter.java
Fri Jan 5 03:13:44 2007
@@ -3,7 +3,6 @@
import java.io.PrintWriter;
import org.osoa.sca.annotations.Destroy;
-import org.osoa.sca.annotations.Init;
import org.osoa.sca.annotations.EagerInit;
import org.apache.tuscany.spi.annotation.Autowire;
Modified:
incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/services/management/jmx/JmxManagementService.java
URL:
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/services/management/jmx/JmxManagementService.java?view=diff&rev=492981&r1=492980&r2=492981
==============================================================================
---
incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/services/management/jmx/JmxManagementService.java
(original)
+++
incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/services/management/jmx/JmxManagementService.java
Fri Jan 5 03:13:44 2007
@@ -22,46 +22,49 @@
import javax.management.MBeanServer;
import javax.management.ObjectName;
-import
org.apache.tuscany.core.services.management.jmx.instrument.InstrumentedComponent;
-import org.apache.tuscany.core.services.management.jmx.runtime.JmxRuntimeInfo;
import org.apache.tuscany.spi.component.Component;
import org.apache.tuscany.spi.services.management.ManagementService;
+import
org.apache.tuscany.core.services.management.jmx.instrument.InstrumentedComponent;
+import org.apache.tuscany.core.services.management.jmx.runtime.JmxRuntimeInfo;
+
/**
* JMX implementation of the management service.
*
* @version $Revision$ $Date$
*/
public class JmxManagementService implements ManagementService<JmxRuntimeInfo>
{
-
+
/**
* MBean server used by the JMX management service.
*/
private MBeanServer mBeanServer;
-
+
/**
* Management domain used by the runtime.
*/
private String managementDomain;
/**
- * @see
org.apache.tuscany.spi.services.management.ManagementService#registerComponent(java.lang.String,org.apache.tuscany.spi.component.Component)
* @throws JmxException In case of an unexpected JMX exception.
+ * @see
org.apache.tuscany.spi.services.management.ManagementService#registerComponent(
+ *java.lang.String,org.apache.tuscany.spi.component.Component)
*/
public final void registerComponent(String name, Component component)
throws JmxException {
-
+
try {
ObjectName on = new ObjectName(managementDomain + ":" +
"type=component,name=" + name);
- InstrumentedComponent mbean = new
InstrumentedComponent(component);
+ InstrumentedComponent mbean = new InstrumentedComponent(component);
mBeanServer.registerMBean(mbean, on);
} catch (JMException ex) {
throw new JmxException(ex);
}
-
+
}
/**
* Initializes the mbean server and management domain.
+ *
* @param runtimeInfo Runtime info for the management service.
*/
public void setRuntimeIno(final JmxRuntimeInfo runtimeInfo) {
Modified:
incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/services/management/jmx/instrument/InstrumentedComponent.java
URL:
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/services/management/jmx/instrument/InstrumentedComponent.java?view=diff&rev=492981&r1=492980&r2=492981
==============================================================================
---
incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/services/management/jmx/instrument/InstrumentedComponent.java
(original)
+++
incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/services/management/jmx/instrument/InstrumentedComponent.java
Fri Jan 5 03:13:44 2007
@@ -19,7 +19,6 @@
package org.apache.tuscany.core.services.management.jmx.instrument;
import java.util.Map;
-
import javax.management.Attribute;
import javax.management.AttributeList;
import javax.management.AttributeNotFoundException;
@@ -30,15 +29,15 @@
import javax.management.MBeanNotificationInfo;
import javax.management.MBeanOperationInfo;
+import org.w3c.dom.Document;
+
import org.apache.tuscany.spi.component.Component;
import org.apache.tuscany.spi.model.PropertyValue;
-import org.w3c.dom.Document;
/**
- * This is Ruscany component exposed as a dynamic MBean. Currently
- * it only supports a read-only vew of all the properties on the
- * component.
- *
+ * This is Ruscany component exposed as a dynamic MBean. Currently it only
supports a read-only vew of all the
+ * properties on the component.
+ *
* @version $Revision$ $Date$
*/
public class InstrumentedComponent implements DynamicMBean {
@@ -47,14 +46,15 @@
* Properties available on the component.
*/
private final Map<String, PropertyValue<?>> properties;
-
+
/**
* Name of the component.
*/
private String componentName;
-
+
/**
* Initializes the property values.
+ *
* @param component Component that is being managed.
*/
@SuppressWarnings("unchecked")
@@ -62,13 +62,13 @@
this.properties = component.getDefaultPropertyValues();
this.componentName = component.getName();
}
-
+
/**
* @see javax.management.DynamicMBean#getAttribute(java.lang.String)
*/
public final Object getAttribute(final String attribute) throws
AttributeNotFoundException {
PropertyValue<?> propertyValue = properties.get(attribute);
- if(propertyValue != null) {
+ if (propertyValue != null) {
return propertyValue.getValue();
}
throw new AttributeNotFoundException(attribute + " not found.");
@@ -78,41 +78,42 @@
* @see javax.management.DynamicMBean#getAttributes(java.lang.String[])
*/
public final AttributeList getAttributes(final String[] attributes) {
-
+
AttributeList list = new AttributeList();
- for(String attribute : attributes) {
+ for (String attribute : attributes) {
try {
list.add(new Attribute(attribute, getAttribute(attribute)));
- } catch(AttributeNotFoundException ex) {
+ } catch (AttributeNotFoundException ex) {
throw new InstrumentationException(ex);
}
}
return list;
-
+
}
/**
* @see javax.management.DynamicMBean#getMBeanInfo()
*/
public final MBeanInfo getMBeanInfo() {
-
+
final MBeanConstructorInfo[] constructors = null;
final MBeanOperationInfo[] operations = null;
final MBeanNotificationInfo[] notifications = null;
-
+
final MBeanAttributeInfo[] attributes = new
MBeanAttributeInfo[properties.size()];
-
+
int i = 0;
- for(PropertyValue<?> propertyValue : properties.values()) {
- attributes[i++] = new MBeanAttributeInfo(propertyValue.getName(),
Document.class.getName(), null, true, false, false);
+ for (PropertyValue<?> propertyValue : properties.values()) {
+ attributes[i++] =
+ new MBeanAttributeInfo(propertyValue.getName(),
Document.class.getName(), null, true, false, false);
}
-
+
return new MBeanInfo(componentName, null, attributes, constructors,
operations, notifications);
-
+
}
/**
- * @see javax.management.DynamicMBean#invoke(java.lang.String,
java.lang.Object[], java.lang.String[])
+ * @see
javax.management.DynamicMBean#invoke(java.lang.String,java.lang.Object[],java.lang.String[])
*/
public final Object invoke(final String actionName, final Object[] params,
final String[] signature) {
throw new UnsupportedOperationException("Managed ops not supported");
Modified:
incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/services/management/jmx/runtime/JmxRuntimeInfo.java
URL:
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/services/management/jmx/runtime/JmxRuntimeInfo.java?view=diff&rev=492981&r1=492980&r2=492981
==============================================================================
---
incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/services/management/jmx/runtime/JmxRuntimeInfo.java
(original)
+++
incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/services/management/jmx/runtime/JmxRuntimeInfo.java
Fri Jan 5 03:13:44 2007
@@ -31,7 +31,7 @@
public interface JmxRuntimeInfo extends RuntimeInfo {
/** Component name. */
- static String COMPONENT_NAME = "JmxRuntimeInfo";
+ String COMPONENT_NAME = "JmxRuntimeInfo";
/**
* Returns a reference to the mbean server used by the host.
Modified:
incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/services/management/jmx/runtime/JmxRuntimeInfoImpl.java
URL:
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/services/management/jmx/runtime/JmxRuntimeInfoImpl.java?view=diff&rev=492981&r1=492980&r2=492981
==============================================================================
---
incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/services/management/jmx/runtime/JmxRuntimeInfoImpl.java
(original)
+++
incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/services/management/jmx/runtime/JmxRuntimeInfoImpl.java
Fri Jan 5 03:13:44 2007
@@ -20,17 +20,14 @@
import java.io.File;
import java.net.URL;
-
import javax.management.MBeanServer;
-import org.apache.tuscany.core.services.management.jmx.runtime.JmxRuntimeInfo;
import org.apache.tuscany.host.AbstractRuntimeInfo;
/**
* Implementation for the <code>JmxRuntimeInfo</code> interface.
- *
- * @version $Revision$ $Date: 2006-12-31 20:23:49 +0000 (Sun, 31 Dec
- * 2006) $
+ *
+ * @version $Revision$ $Date$
*/
public class JmxRuntimeInfoImpl extends AbstractRuntimeInfo implements
JmxRuntimeInfo {
@@ -46,11 +43,11 @@
/**
* Initializes the runtime info instance.
- *
- * @param baseUrl Base Url.
+ *
+ * @param baseUrl Base Url.
* @param installDirectory Install directory.
- * @param online Onlne indicator.
- * @param mBeanServer MBean server.
+ * @param online Onlne indicator.
+ * @param mBeanServer MBean server.
* @param managementDomain Management doamin for the runtime.
*/
public JmxRuntimeInfoImpl(final URL baseUrl,
@@ -72,7 +69,7 @@
/**
* Returns the default domain used by the host.
- *
+ *
* @return Default domain used by the host.
*/
public final String getManagementDomain() {
Modified:
incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/wire/IncompatibleServiceContractExceptionFormatterTestCase.java
URL:
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/wire/IncompatibleServiceContractExceptionFormatterTestCase.java?view=diff&rev=492981&r1=492980&r2=492981
==============================================================================
---
incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/wire/IncompatibleServiceContractExceptionFormatterTestCase.java
(original)
+++
incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/wire/IncompatibleServiceContractExceptionFormatterTestCase.java
Fri Jan 5 03:13:44 2007
@@ -34,7 +34,8 @@
*/
public class IncompatibleServiceContractExceptionFormatterTestCase extends
TestCase {
FormatterRegistry registry =
EasyMock.createNiceMock(FormatterRegistry.class);
- IncompatibleServiceContractExceptionFormatter formatter = new
IncompatibleServiceContractExceptionFormatter(registry);
+ IncompatibleServiceContractExceptionFormatter formatter =
+ new IncompatibleServiceContractExceptionFormatter(registry);
public void testFormat() throws Exception {
ServiceContract<Object> source = new ServiceContract<Object>() {
Modified:
incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/extension/CompositeComponentExtension.java
URL:
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/extension/CompositeComponentExtension.java?view=diff&rev=492981&r1=492980&r2=492981
==============================================================================
---
incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/extension/CompositeComponentExtension.java
(original)
+++
incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/extension/CompositeComponentExtension.java
Fri Jan 5 03:13:44 2007
@@ -301,7 +301,8 @@
// FIXME JNB make this faster and thread safe
for (Map.Entry<Class, InboundWire> service :
systemAutowireInternal.entrySet()) {
if (instanceInterface.isAssignableFrom(service.getKey())) {
- return service.getValue(); }
+ return service.getValue();
+ }
}
if (getParent() != null) {
return getParent().resolveSystemAutowire(instanceInterface);
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]