org.exolab.jms.jndi.mipc
Class NameServiceProxy

java.lang.Object
  |
  +--org.exolab.jms.jndi.mipc.NameServiceProxy
All Implemented Interfaces:
NamingProvider

public class NameServiceProxy
extends java.lang.Object
implements NamingProvider

The underlying communication interface for remote contexts over the tcp connector.

Version:
$Revision: 1.2 $
Author:
Tim Anderson

Constructor Summary
NameServiceProxy(org.exolab.core.ipc.Client connection)
           
 
Method Summary
 void bind(javax.naming.Name name, java.lang.String className, java.lang.Object object)
           
protected  java.lang.Object checkReply(java.lang.String method)
          A convenience method to check the success of operations which return a true on sucess.
 javax.naming.Context createSubcontext(javax.naming.Name name)
           
 void destroySubcontext(javax.naming.Name name)
           
protected  java.lang.String getClassName()
          Return the Server class name that will handle this request.
 javax.naming.NameParser getNameParser()
           
 javax.naming.NameClassPair[] list(javax.naming.Name name)
           
 javax.naming.Binding[] listBindings(javax.naming.Name name)
           
 java.lang.Object lookup(javax.naming.Name name)
           
protected  java.util.Vector pack(java.lang.String method, int numParams)
          Pack all the data that is required by the server in a vector.
 void rebind(javax.naming.Name name, java.lang.String className, java.lang.Object object)
           
protected  void send(java.util.Vector v)
          A convenience method to send a packed command to the server.
 void unbind(javax.naming.Name name)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NameServiceProxy

public NameServiceProxy(org.exolab.core.ipc.Client connection)
Method Detail

getNameParser

public javax.naming.NameParser getNameParser()
                                      throws javax.naming.NamingException
Specified by:
getNameParser in interface NamingProvider

bind

public void bind(javax.naming.Name name,
                 java.lang.String className,
                 java.lang.Object object)
          throws javax.naming.NamingException
Specified by:
bind in interface NamingProvider

rebind

public void rebind(javax.naming.Name name,
                   java.lang.String className,
                   java.lang.Object object)
            throws javax.naming.NamingException
Specified by:
rebind in interface NamingProvider

createSubcontext

public javax.naming.Context createSubcontext(javax.naming.Name name)
                                      throws javax.naming.NamingException
Specified by:
createSubcontext in interface NamingProvider

destroySubcontext

public void destroySubcontext(javax.naming.Name name)
                       throws javax.naming.NamingException
Specified by:
destroySubcontext in interface NamingProvider

list

public javax.naming.NameClassPair[] list(javax.naming.Name name)
                                  throws javax.naming.NamingException
Specified by:
list in interface NamingProvider

listBindings

public javax.naming.Binding[] listBindings(javax.naming.Name name)
                                    throws javax.naming.NamingException
Specified by:
listBindings in interface NamingProvider

lookup

public java.lang.Object lookup(javax.naming.Name name)
                        throws javax.naming.NamingException
Specified by:
lookup in interface NamingProvider

unbind

public void unbind(javax.naming.Name name)
            throws javax.naming.NamingException
Specified by:
unbind in interface NamingProvider

pack

protected java.util.Vector pack(java.lang.String method,
                                int numParams)
Pack all the data that is required by the server in a vector. Set the size of the vector to be exactly the right size for efficiency.
Parameters:
method - The function to activate on the server.
numParams - The number of paramaters this method will require.
Returns:
Vector The vector containing all the data.

getClassName

protected java.lang.String getClassName()
Return the Server class name that will handle this request.
Returns:
The class name.

checkReply

protected java.lang.Object checkReply(java.lang.String method)
                               throws javax.naming.NamingException
A convenience method to check the success of operations which return a true on sucess.
Parameters:
method - The requested server function.
Throws:
javax.naming.NamingException - on any failure.

send

protected void send(java.util.Vector v)
             throws javax.naming.NamingException
A convenience method to send a packed command to the server.
Throws:
javax.naming.NamingException - on any failure.


Copyright © 1999-2004 The OpenJMS Group. All Rights Reserved.