Package com.webmethods.jms.protocol
Class BrokerURL
- java.lang.Object
-
- com.webmethods.jms.protocol.BrokerURL
-
public class BrokerURL extends java.lang.Object
This class represents the network location of a Broker Server.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
DEFAULT_HOST
The Broker Server's default host.static int
DEFAULT_TCP_PORT
The Broker Server's default port.
-
Constructor Summary
Constructors Constructor Description BrokerURL(java.lang.String url)
Creates a Broker URL.BrokerURL(java.lang.String brokerName, java.lang.String brokerHost)
Creates a Broker URL.BrokerURL(java.lang.String brokerName, java.lang.String host, java.lang.String port)
Creates a Broker URL.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getBroker()
Returns the Broker URL Broker name.java.lang.String
getBrokerHost()
Returns the Broker URL [][: ] java.lang.String
getHost()
Returns the Broker URL host.int
getPort()
Returns the Broker URL port.java.lang.String
getURL()
Returns the fully qualified Broker URL.static boolean
isLocalHost(java.lang.String host)
Utility method to find given hostname is valid local or loop back or address (IPV4 and IPV6) is defined on any interface.java.lang.String
toString()
Returns a string representation of this object.
-
-
-
Field Detail
-
DEFAULT_HOST
public static final java.lang.String DEFAULT_HOST
The Broker Server's default host.- See Also:
- Constant Field Values
-
DEFAULT_TCP_PORT
public static final int DEFAULT_TCP_PORT
The Broker Server's default port.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
BrokerURL
public BrokerURL(java.lang.String url) throws javax.jms.JMSException
Creates a Broker URL.- Parameters:
url
- Broker location with syntax [broker@][][: ] - Throws:
javax.jms.JMSException
- for invalid port numbers
-
BrokerURL
public BrokerURL(java.lang.String brokerName, java.lang.String host, java.lang.String port) throws javax.jms.JMSException
Creates a Broker URL.- Parameters:
brokerName
- the Broker namehost
- the Broker hostport
- the Broker port- Throws:
javax.jms.JMSException
- for invalid port numbers
-
BrokerURL
public BrokerURL(java.lang.String brokerName, java.lang.String brokerHost) throws javax.jms.JMSException
Creates a Broker URL.- Parameters:
brokerName
- the Broker namebrokerHost
- the Broker [][: ] - Throws:
javax.jms.JMSException
- for invalid port numbers
-
-
Method Detail
-
getURL
public java.lang.String getURL()
Returns the fully qualified Broker URL.- Returns:
- the fully qualified Broker URL
-
getBroker
public java.lang.String getBroker()
Returns the Broker URL Broker name.- Returns:
- the Broker URL Broker name
-
getHost
public java.lang.String getHost()
Returns the Broker URL host.- Returns:
- the Broker URL host
-
getBrokerHost
public java.lang.String getBrokerHost()
Returns the Broker URL [][: ] - Returns:
- the Broker URL [
][: ]
-
getPort
public int getPort()
Returns the Broker URL port.- Returns:
- the Broker URL port
-
toString
public java.lang.String toString()
Returns a string representation of this object.- Overrides:
toString
in classjava.lang.Object
- Returns:
- a string representation of this object
-
isLocalHost
public static boolean isLocalHost(java.lang.String host)
Utility method to find given hostname is valid local or loop back or address (IPV4 and IPV6) is defined on any interface.- Parameters:
host
-- Returns:
- boolean
-
-