|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.hornetq.api.core.TransportConfiguration
public class TransportConfiguration
A TransportConfiguration is used by a client to specify connections to a server and its backup if one exists.
Typically the constructors take the class name and parameters for needed to create the connection. These will be different dependent on which connector is being used, i.e. Netty or InVM etc. For example:
HashMap<String, Object> map = new HashMap<String, Object>(); map.put("host", "localhost"); map.put("port", 5445); TransportConfiguration config = new TransportConfiguration(InVMConnectorFactory.class.getName(), map); ClientSessionFactory sf = new ClientSessionFactoryImpl(config);
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
void |
decode(org.hornetq.api.core.HornetQBuffer buffer)
Decodes this TransportConfiguration from a buffer. |
void |
encode(org.hornetq.api.core.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()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
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 ConnectorFactoryMethod Detail |
---|
public static String[] splitHosts(String commaSeparatedHosts)
commaSeparatedHosts
- the comma separated host string
public String getName()
public String getFactoryClassName()
public Map<String,Object> getParams()
public int hashCode()
hashCode
in class Object
public boolean equals(Object other)
equals
in class Object
public boolean isEquivalent(TransportConfiguration otherConfig)
otherConfig
-
true
if the factory class names are equivalentspublic String toString()
toString
in class Object
public void encode(org.hornetq.api.core.HornetQBuffer buffer)
buffer
- the buffer to encode intopublic void decode(org.hornetq.api.core.HornetQBuffer buffer)
buffer
- the buffer to decode from
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |