Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

By default, it publishes all interfaces implemented by the implementation class of the component class. It collects all super-interfaces (interfaces implemented by implemented interfaces and by super class). However it is possible to set exposed interface with the interface attribute to avoid to exposes all collected interfaces.

The following xml snippet is equivalent to the previous example:

...

Code Block
public class FooProviderType1 implements FooService {
	private String m_foo;
	public void foo() {
		System.out.println("foo  " + m_foo);
	}	void fooMethod(String newFoo) {
		m_foo = newFoo;
	} 

A property can declare both a field and a method. In this case, the field receive the value and then the method is called. 

Code Block
<component className="...FooProviderType1">
            <provides>
                        <property name="foo" method="fooMethod" field="m_foo" value="Foo">
                        <property name="intProps" type="int" value="5">
            </provides>
</component> component>
Code Block
public class FooProviderType1 implements FooService {
	private String m_foo;
	public void foo() {
		System.out.println("foo  " + m_foo);
	}	void fooMethod(String newFoo) {
		System.out.println("Update foo : " + m_foo);
	}

...