public class TransportConfiguration extends Object implements Serializable
HashMap map = new HashMap();
map.put("host", "localhost");
map.put("port", 5445);
TransportConfiguration config = new TransportConfiguration(InVMConnectorFactory.class.getName(), map);
ClientSessionFactory sf = new ClientSessionFactoryImpl(config);
Constructor and Description |
---|
TransportConfiguration()
Creates a default TransportConfiguration with no configured transport.
|
TransportConfiguration(String className)
Creates a TransportConfiguration providing the class name of the
ConnectorFactory |
TransportConfiguration(String className,
Map<String,Object> params)
Creates a TransportConfiguration providing the class name of the
ConnectorFactory
and any parameters needed. |
TransportConfiguration(String className,
Map<String,Object> params,
String name)
Creates a TransportConfiguration with a specific name providing the class name of the
ConnectorFactory
and any parameters needed. |
Modifier and Type | Method and Description |
---|---|
void |
decode(HornetQBuffer buffer)
Decodes this TransportConfiguration from a buffer.
|
void |
encode(HornetQBuffer buffer)
Encodes this TransportConfiguration into a buffer.
|
boolean |
equals(Object other) |
String |
getFactoryClassName()
Returns the class name of ConnectorFactory being used by this TransportConfiguration
|
String |
getName()
Returns the name of this TransportConfiguration.
|
Map<String,Object> |
getParams()
Returns any parameters set for this TransportConfiguration
|
int |
hashCode() |
boolean |
isEquivalent(TransportConfiguration otherConfig)
There's a case on ClusterConnections that we need to find an equivalent Connector
and we can't use a Netty Cluster Connection on an InVM ClusterConnection (inVM used on tests)
for that reason I need to test if the two instances of the TransportConfiguration are equivalent
while a test a connector against an acceptor
|
static String[] |
splitHosts(String commaSeparatedHosts)
Utility method for splitting a comma separated list of hosts
|
String |
toString() |
public TransportConfiguration()
public TransportConfiguration(String className, Map<String,Object> params, String name)
ConnectorFactory
and any parameters needed.className
- The class name of the ConnectorFactoryparams
- The parameters needed by the ConnectorFactoryname
- The name of this TransportConfigurationpublic TransportConfiguration(String className, Map<String,Object> params)
ConnectorFactory
and any parameters needed.className
- The class name of the ConnectorFactoryparams
- The parameters needed by the ConnectorFactorypublic TransportConfiguration(String className)
ConnectorFactory
className
- The class name of the ConnectorFactorypublic static String[] splitHosts(String commaSeparatedHosts)
commaSeparatedHosts
- the comma separated host stringpublic String getName()
public String getFactoryClassName()
public Map<String,Object> getParams()
public boolean isEquivalent(TransportConfiguration otherConfig)
otherConfig
- public void encode(HornetQBuffer buffer)
buffer
- the buffer to encode intopublic void decode(HornetQBuffer buffer)
buffer
- the buffer to decode fromCopyright © 2012 JBoss by Red Hat. All Rights Reserved.