org.jboss.remoting
Class InvokerLocator

java.lang.Object
  extended byorg.jboss.remoting.InvokerLocator
All Implemented Interfaces:
Serializable

public class InvokerLocator
extends Object
implements Serializable

InvokerLocator is an object that indentifies a specific Invoker on the network, via a unique locator URI. The locator URI is in the format:

protocol://host[:port][/path[?param=value¶m2=value2]]

For example, a http based locator might be:

http://192.168.10.1:8081

An example Socket based locator might be:

socket://192.168.10.1:9999

An example RMI based locator might be:

rmi://localhost

NOTE: the hostname will automatically be resolved to the outside IP address of the local machine if localhost or 127.0.0.1 is used as the hostname in the URI. If it cannot be determined or resolved, it will use what was passed.

Version:
$Revision: 1.17 $
Author:
Jeff Haynie, Tom Elrod
See Also:
Serialized Form

Field Summary
static String BYVALUE
          Constant to define the param name to be used when defining if marshalling should be by value, which means will be remote client invoker instead of using local client invoker.
static String DATATYPE
          Constant to define the param name to be used when defining the data type.
static String DATATYPE_CASED
           
protected  String host
           
static String LOADER_PORT
          Constant to define what port the marshalling loader port resides on.
static String MARSHALLER
          Constant to define the param name to be used when defining the marshaller fully qualified classname
protected  Map parameters
           
protected  String path
           
protected  int port
           
protected  String protocol
           
static String UNMARSHALLER
          Constant to define the param name to be used when defining the unmarshaller fully qualified classname
 
Constructor Summary
InvokerLocator(String uri)
           
InvokerLocator(String protocol, String host, int port, String path, Map parameters)
           
 
Method Summary
 boolean equals(Object obj)
           
 String getHost()
           
 String getLocatorURI()
          return the locator URI, in the format:
 String getOriginalURI()
           
 Map getParameters()
           
 String getPath()
           
 int getPort()
           
 String getProtocol()
           
 int hashCode()
           
 ClientInvoker narrow()
          narrow this invoker to a specific RemoteClientInvoker instance
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

protocol

protected String protocol

host

protected String host

port

protected int port

path

protected String path

parameters

protected Map parameters

DATATYPE

public static final String DATATYPE
Constant to define the param name to be used when defining the data type.

See Also:
Constant Field Values

DATATYPE_CASED

public static final String DATATYPE_CASED
See Also:
Constant Field Values

MARSHALLER

public static final String MARSHALLER
Constant to define the param name to be used when defining the marshaller fully qualified classname

See Also:
Constant Field Values

UNMARSHALLER

public static final String UNMARSHALLER
Constant to define the param name to be used when defining the unmarshaller fully qualified classname

See Also:
Constant Field Values

LOADER_PORT

public static final String LOADER_PORT
Constant to define what port the marshalling loader port resides on.

See Also:
Constant Field Values

BYVALUE

public static final String BYVALUE
Constant to define the param name to be used when defining if marshalling should be by value, which means will be remote client invoker instead of using local client invoker.

See Also:
Constant Field Values
Constructor Detail

InvokerLocator

public InvokerLocator(String uri)
               throws MalformedURLException

InvokerLocator

public InvokerLocator(String protocol,
                      String host,
                      int port,
                      String path,
                      Map parameters)
Method Detail

hashCode

public int hashCode()

equals

public boolean equals(Object obj)

getLocatorURI

public String getLocatorURI()
return the locator URI, in the format:

protocol://host[:port][/path[?param=value¶m2=value2]]

Returns:

getProtocol

public String getProtocol()

getHost

public String getHost()

getPort

public int getPort()

getPath

public String getPath()

getParameters

public Map getParameters()

toString

public String toString()

getOriginalURI

public String getOriginalURI()

narrow

public ClientInvoker narrow()
                     throws Exception
narrow this invoker to a specific RemoteClientInvoker instance

Returns:
Throws:
Exception


Copyright © 2004 JBoss Inc. All Rights Reserved.