Class DivertConfiguration
- java.lang.Object
-
- org.apache.activemq.artemis.core.config.DivertConfiguration
-
- All Implemented Interfaces:
Serializable,EncodingSupport
public class DivertConfiguration extends Object implements Serializable, EncodingSupport
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static StringADDRESSstatic StringEXCLUSIVEstatic StringFILTER_STRINGstatic StringFORWARDING_ADDRESSstatic StringNAMEstatic StringROUTING_NAMEstatic StringROUTING_TYPEstatic StringTRANSFORMER_CONFIGURATION
-
Constructor Summary
Constructors Constructor Description DivertConfiguration()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddecode(ActiveMQBuffer buffer)voidencode(ActiveMQBuffer buffer)booleanequals(Object obj)static DivertConfigurationfromJSON(String jsonString)This method returns aDivertConfigurationcreated from the JSON-formatted inputString.StringgetAddress()intgetEncodeSize()StringgetFilterString()StringgetForwardingAddress()StringgetName()StringgetRoutingName()org.apache.activemq.artemis.core.server.ComponentConfigurationRoutingTypegetRoutingType()TransformerConfigurationgetTransformerConfiguration()inthashCode()booleanisExclusive()DivertConfigurationset(String key, String value)Set the value of a parameter based on its "key"String.DivertConfigurationsetAddress(String address)DivertConfigurationsetExclusive(boolean exclusive)DivertConfigurationsetFilterString(String filterString)DivertConfigurationsetForwardingAddress(String forwardingAddress)DivertConfigurationsetName(String name)DivertConfigurationsetRoutingName(String routingName)DivertConfigurationsetRoutingType(org.apache.activemq.artemis.core.server.ComponentConfigurationRoutingType routingType)DivertConfigurationsetTransformerConfiguration(TransformerConfiguration transformerConfiguration)StringtoJSON()This method returns a JSON-formattedStringrepresentation of thisDivertConfiguration.StringtoString()
-
-
-
Field Detail
-
NAME
public static String NAME
-
ROUTING_NAME
public static String ROUTING_NAME
-
ADDRESS
public static String ADDRESS
-
FORWARDING_ADDRESS
public static String FORWARDING_ADDRESS
-
EXCLUSIVE
public static String EXCLUSIVE
-
FILTER_STRING
public static String FILTER_STRING
-
TRANSFORMER_CONFIGURATION
public static String TRANSFORMER_CONFIGURATION
-
ROUTING_TYPE
public static String ROUTING_TYPE
-
-
Method Detail
-
set
public DivertConfiguration set(String key, String value)
Set the value of a parameter based on its "key"String. Valid key names and correspondingstaticfinalare:- name:
NAME - routing-name:
ROUTING_NAME - address:
ADDRESS - forwarding-address:
FORWARDING_ADDRESS - exclusive:
EXCLUSIVE - filter-string:
FILTER_STRING - transformer-configuration:
TRANSFORMER_CONFIGURATION - routing-type:
ROUTING_TYPE
The
String-based values will be converted to the proper value types based on the underlying property. For example, if you pass the value "TRUE" for the key "exclusive" theString"TRUE" will be converted to theBooleantrue.- Parameters:
key- the key to set to the valuevalue- the value to set for the key- Returns:
- this
DivertConfiguration
- name:
-
getName
public String getName()
-
getRoutingName
public String getRoutingName()
-
getAddress
public String getAddress()
-
getForwardingAddress
public String getForwardingAddress()
-
isExclusive
public boolean isExclusive()
-
getFilterString
public String getFilterString()
-
getTransformerConfiguration
public TransformerConfiguration getTransformerConfiguration()
-
getRoutingType
public org.apache.activemq.artemis.core.server.ComponentConfigurationRoutingType getRoutingType()
-
setName
public DivertConfiguration setName(String name)
- Parameters:
name- the name to set
-
setRoutingName
public DivertConfiguration setRoutingName(String routingName)
- Parameters:
routingName- the routingName to set
-
setAddress
public DivertConfiguration setAddress(String address)
- Parameters:
address- the address to set
-
setForwardingAddress
public DivertConfiguration setForwardingAddress(String forwardingAddress)
- Parameters:
forwardingAddress- the forwardingAddress to set
-
setExclusive
public DivertConfiguration setExclusive(boolean exclusive)
- Parameters:
exclusive- the exclusive to set
-
setFilterString
public DivertConfiguration setFilterString(String filterString)
- Parameters:
filterString- the filterString to set
-
setTransformerConfiguration
public DivertConfiguration setTransformerConfiguration(TransformerConfiguration transformerConfiguration)
- Parameters:
transformerConfiguration- the transformerConfiguration to set
-
setRoutingType
public DivertConfiguration setRoutingType(org.apache.activemq.artemis.core.server.ComponentConfigurationRoutingType routingType)
- Parameters:
routingType- the routingType to set
-
toJSON
public String toJSON()
This method returns a JSON-formattedStringrepresentation of thisDivertConfiguration. It is a simple collection of key/value pairs. The keys used are referenced inset(String, String).- Returns:
- a JSON-formatted
Stringrepresentation of thisDivertConfiguration
-
fromJSON
public static DivertConfiguration fromJSON(String jsonString)
This method returns aDivertConfigurationcreated from the JSON-formatted inputString. The input should be a simple object of key/value pairs. Valid keys are referenced inset(String, String).- Parameters:
jsonString- json string- Returns:
- the
DivertConfigurationcreated from the JSON-formatted inputString
-
getEncodeSize
public int getEncodeSize()
- Specified by:
getEncodeSizein interfaceEncodingSupport
-
encode
public void encode(ActiveMQBuffer buffer)
- Specified by:
encodein interfaceEncodingSupport
-
decode
public void decode(ActiveMQBuffer buffer)
- Specified by:
decodein interfaceEncodingSupport
-
-