de.dfki.util.xmlrpc.annotation
Annotation Type XmlRpc


@Documented
@Retention(value=RUNTIME)
@Target(value=TYPE)
public @interface XmlRpc

Annotation which indicates that a type can be used in a XML-RPC transfer. It defines how to convert type instances to and from a XML-RPC representation.
There are four types of conversion:

The parameter is a concrete type and controls instance transformation itself.
The type needs a public constructor accepting instances of the given XML-RPC type. This constructor is used for creating parameter instances from XML-RPC a representation. Additionally it has to implement the Convertible interface. This adds the toXmlRpc()
method which does the conversion from the parameter instance into the XML-RPC representation.
The parameter type is an interface or an abstract class. A concrete implementation defines the conversion methods.
The concrete class has to be a subclass of the parameter type. It also needs a public constructor compliant to the given XML-RPC type and has to implement the Convertible interface. Use the concrete() field to declare the concrete implementation class.
A separate converter does the conversion work.
Use converter() to set the converter class. The conveter needs a public noarg constructor and must implement the ParameterConverter interface.
The parameter type is a XmlRpcBean.
All properties of the bean are automatically converted. Property types have to be either standard XML-RPC types or they have to be convertable according to this four rules given here.

See Also:
XmlRpcBean, ConverterMappings

Required Element Summary
 XmlRpc.Type type
          The XML-RPC type this parameter is mapped to.
 
Optional Element Summary
 java.lang.Class<? extends Convertible<?>> concrete
          The concrete class performs the type conversions⋅ The concrete class has to be a subclass of the parameter type.
 java.lang.Class<? extends ParameterConverter<?,?>> converter
          A separate converter to do the parameter conversion⋅ The converter needs a public noarg constructor and must implement the ParameterConverter interface.
 

Element Detail

type

public abstract XmlRpc.Type type
The XML-RPC type this parameter is mapped to.

concrete

public abstract java.lang.Class<? extends Convertible<?>> concrete
The concrete class performs the type conversions⋅ The concrete class has to be a subclass of the parameter type. It also needs a public constructor compliant to the given XML-RPC type and has to implement the Convertible interface.

Default:
de.dfki.util.xmlrpc.conversion.NoParameterBoundConverter.class

converter

public abstract java.lang.Class<? extends ParameterConverter<?,?>> converter
A separate converter to do the parameter conversion⋅ The converter needs a public noarg constructor and must implement the ParameterConverter interface.

Default:
de.dfki.util.xmlrpc.conversion.NoSeparateParameterConverter.class


Copyright © 2012. All Rights Reserved.