org.jgroups.annotations
Annotation Type Property


@Retention(value=RUNTIME)
@Target(value={METHOD,FIELD})
public @interface Property

Represents a Protocol property assigned from corresponding field in JGroups properties file.

Since all protocol properties are read as String instances from properties file properties need to be converted to an appropriate field type of a matching Protocol instance. JGroups supplies set of converters in PropertyConverters class.

Third parties can provide their own converters if such need arises by implementing PropertyConverter interface and by specifying that converter as converter on a specific Property annotation of a field or a method instance.

Property annotation can decorate either a field or a method of a Property class. If a method is decorated with Property annotation it is assumed that such a method is a setter with only one parameter type that a specified converter can convert from a String to an actual type.

Author:
Vladimir Blagojevic

Optional Element Summary
 java.lang.Class<?> converter
           
 java.lang.String defaultValueIPv4
          Global.NON_LOOPBACK_ADDRESS means pick any valid non-loopback IPv4 address
 java.lang.String defaultValueIPv6
          Global.NON_LOOPBACK_ADDRESS means pick any valid non-loopback IPv6 address
 java.lang.String dependsUpon
           
 java.lang.String deprecatedMessage
           
 java.lang.String description
           
 boolean exposeAsManagedAttribute
          Expose this property also as a managed attribute
 java.lang.String name
           
 java.lang.String[] systemProperty
           
 boolean writable
           
 

name

public abstract java.lang.String name
Default:
""

description

public abstract java.lang.String description
Default:
""

deprecatedMessage

public abstract java.lang.String deprecatedMessage
Default:
""

converter

public abstract java.lang.Class<?> converter
Default:
org.jgroups.conf.PropertyConverters.Default.class

dependsUpon

public abstract java.lang.String dependsUpon
Default:
""

systemProperty

public abstract java.lang.String[] systemProperty
Default:
{}

defaultValueIPv4

public abstract java.lang.String defaultValueIPv4
Global.NON_LOOPBACK_ADDRESS means pick any valid non-loopback IPv4 address

Default:
""

defaultValueIPv6

public abstract java.lang.String defaultValueIPv6
Global.NON_LOOPBACK_ADDRESS means pick any valid non-loopback IPv6 address

Default:
""

exposeAsManagedAttribute

public abstract boolean exposeAsManagedAttribute
Expose this property also as a managed attribute

Default:
true

writable

public abstract boolean writable
Default:
true


Copyright © 1998-2012 Bela Ban / Red Hat. All Rights Reserved.