org.jboss.remoting.InvokerLocator
This topic has not yet been written. The content below is from the topic description.
org.jboss.remoting.InvokerLocator – is a class, which can be described as a string URI, for identifying a particular JBossRemoting server JVM and transport protocol. For example, the InvokerLocator string socket://192.168.10.1:8080 describes a TCP/IP Socket-based transport, which is listening on port 8080 of the IP address, 192.168.10.1. Using the string URI, or the InvokerLocator object, JBossRemoting can make a client connection to the remote server. The format of the locator string is the same as the URI type: [transport]://[host]: /path/?& A few important points to note about the InvokerLocator. The string representation used to construct the InvokerLocator may be modified after creation. This can occur if the host supplied is 0.0.0.0, in which case the InvokerLocator will attempt to replace it with the value of the local host name. This can also occur if the port specified is less than zero or not specified at all (in which case remoting will select a random port to use). The InvokerLocator will accept host name as is and will not automatically convert to IP address (since 2.0.0 release). There are two comparison operators for InvocatorLocators, equals() and isSameEndpoint(), and neither resolve a hostname to IP address or vice versa. equals() compares all components of the InvokerLocator, character by character, while isSameEndpoint() uses only protocol, host, and port. The following examples are just some of the comparisons that can be seen in org.jboss.test.remoting.locator.InvokerLocatorTestCase: new InvokerLocator("http://localhost:1234/services/uri:Test").equals( new InvokerLocator("http://localhost:1234")) returns false new InvokerLocator("http://localhost:1234/services/uri:Test").equals( new InvokerLocator("http://127.0.0.1:1234")) returns false new InvokerLocator("http://localhost:1234/services/uri:Test").isSameEndpoint( new InvokerLocator("http://localhost:1234")) returns true new InvokerLocator("http://localhost:1234/services/uri:Test").isSameEndpoint( new InvokerLocator("http://127.0.0.1:1234")) returns false N.B. As of version 2.4, InvokerLocator uses the class java.net.URI, rather than its original ad hoc parsing code, to parse the String passed to its constructor. If, for some reason, the new algorithm causes problems for legacy code, it is possible to configure InvokerLocator to use the original parsing code by calling the static method org.jboss.remoting.InvokerLocator.setUseLegacyParsing(). N.B.The syntax of URIs is defined in http://www.ietf.org/rfc/rfc2396.txt. A not unknown error is to give a hostname with the illegal underscore character "_", which confuses the java.net.URI parsing algorithm, leading to the hostname being set to null. As of release 2.5.2.SP3, org.jboss.remoting.InvokerLocator will log a warning if the hostname is set to null. This warning can be disabled by setting the system property InvokerLocator.SUPPRESS_HOST_WARNING (actual value "suppressHostWarning") to "true".