com.mjh.switchrmi
Class RmiClient

java.lang.Object
  |
  +--com.mjh.switchrmi.RmiClient

public class RmiClient
extends java.lang.Object

RmiClient provides the client-side interface to connect to remote objects served by any of the remote method invocation transports.

Author:
Mike Henderson

Constructor Summary
RmiClient()
          Initialize a client for connecting to remote objects via HTTP.
RmiClient(java.lang.String resourceName)
          Creates a new RmiClient object.
 
Method Summary
 java.lang.Object connect(java.lang.String url, java.lang.Class interfaze)
          Obtain a proxy for the remote obejct with the given URL to invoke methods in the specified interface.
 java.lang.Object connect(java.lang.String url, java.lang.Class[] interfaces)
          Obtain a proxy for the remote obejct with the given URL to invoke methods in the specified interfaces.
 java.lang.Object connect(java.lang.String url, java.lang.Class[] interfaces, java.lang.String protocolName)
          Obtain a proxy for the remote obejct with the given URL to invoke methods in the specified interfaces.
 java.lang.Object connect(java.lang.String url, java.lang.Class interfaze, java.lang.String protocolName)
          Obtain a proxy for the remote obejct with the given URL to invoke methods in the specified interfaces.
 java.lang.Object getJndiContext()
          DOCUMENT ME!
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RmiClient

public RmiClient()
          throws java.lang.Exception
Initialize a client for connecting to remote objects via HTTP.


RmiClient

public RmiClient(java.lang.String resourceName)
          throws java.lang.Exception
Creates a new RmiClient object.

Parameters:
resourceName - DOCUMENT ME!
Throws:
java.lang.Exception - DOCUMENT ME!
Method Detail

getJndiContext

public java.lang.Object getJndiContext()
DOCUMENT ME!

Returns:
DOCUMENT ME!

connect

public java.lang.Object connect(java.lang.String url,
                                java.lang.Class interfaze)
                         throws java.lang.Exception
Obtain a proxy for the remote obejct with the given URL to invoke methods in the specified interface.

Parameters:
url - a valid remote object URL, valid URLS end in /name.protocol
Returns:
a Proxy to the remote object.
java.lang.Exception

connect

public java.lang.Object connect(java.lang.String url,
                                java.lang.Class[] interfaces)
                         throws java.lang.Exception
Obtain a proxy for the remote obejct with the given URL to invoke methods in the specified interfaces.

Parameters:
url - a valid remote object URL, valid URLS end in /name.protocol
interfaces - an array of Java interfaces implemented by the remote object.
Returns:
a Proxy to the remote object.
java.lang.Exception

connect

public java.lang.Object connect(java.lang.String url,
                                java.lang.Class interfaze,
                                java.lang.String protocolName)
                         throws java.lang.Exception
Obtain a proxy for the remote obejct with the given URL to invoke methods in the specified interfaces.

Parameters:
url - a valid URL,for the remote transport method
protocolName - a valid RMI invocation protocol. Valid names are specified in RmiProtocol.
Returns:
a Proxy to the remote object.
java.lang.Exception
See Also:
RmiProtocol

connect

public java.lang.Object connect(java.lang.String url,
                                java.lang.Class[] interfaces,
                                java.lang.String protocolName)
                         throws java.lang.Exception
Obtain a proxy for the remote obejct with the given URL to invoke methods in the specified interfaces.

Parameters:
url - a valid URL,for the remote transport method
interfaces - an array of Java interfaces implemented by the remote object.
protocolName - a valid RMI invocation protocol. Valid names are specified in RmiProtocol.
Returns:
a Proxy to the remote object.
java.lang.Exception
See Also:
RmiProtocol.


Copyright © 2002-2002 Michael J. Henderson & Associates, LLC. All Rights Reserved.