public class TransportConfig extends Object
Constructor and Description |
---|
TransportConfig(String name)
Creates a new instance.
|
TransportConfig(String name,
boolean enabled,
Properties options)
Creates a new instance.
|
TransportConfig(String name,
boolean enabled,
Properties options,
ConverterRepository<?> converters)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
TransportConfig |
copy()
Creates a new instance as a copy of this one in the sense of a deep copy
apart from the converters.
|
boolean |
equals(Object obj) |
ConverterRepository<?> |
getConverters()
Returns the desired converter repository for the transport.
|
ConverterRepository<?> |
getConverters(ConverterRepository<?> defaultInst)
Returns the desired converter repository for the transport or the
provided default in case no desired instance is is specified.
|
String |
getName()
Returns the name of the transport.
|
Properties |
getOptions()
Returns the transport-specific options.
|
int |
hashCode() |
boolean |
isEnabled()
Indicates whether the transport shall be enabled in participants or not.
|
void |
setConverters(ConverterRepository<?> converters)
Sets the converter repository to be used for this transport.
|
void |
setEnabled(boolean enabled)
Sets whether the transport shall be enabled in participants.
|
void |
setOptions(Properties options)
Sets the transport-specific options.
|
String |
toString() |
public TransportConfig(String name, boolean enabled, Properties options)
name
- name of the transportenabled
- should this transport be enabled in participants or not?options
- transport-specific optionspublic TransportConfig(String name, boolean enabled, Properties options, ConverterRepository<?> converters)
name
- name of the transportenabled
- should this transport be enabled in participants or not?options
- transport-specific optionsconverters
- the converter selection strategy to use for the transport.
null
indicates to use the system-wide
configuration.public TransportConfig(String name)
name
- name of the transportpublic String getName()
public boolean isEnabled()
true
if transport shall be enabled, else
false
public void setEnabled(boolean enabled)
enabled
- true
to enable the transport, else
false
public Properties getOptions()
public void setOptions(Properties options)
options
- options specifically for this transportpublic ConverterRepository<?> getConverters()
null
in case the
system-wide default shall be used.public ConverterRepository<?> getConverters(ConverterRepository<?> defaultInst)
defaultInst
- instance to return in case no converter repository was
specified inside this confignull
in case event
the given default instance was null
.public void setConverters(ConverterRepository<?> converters)
converters
- converters to use or null
to indicate use of
system-wide converterspublic TransportConfig copy()
Copyright © 2018 CoR-Lab. All rights reserved.