FileDocCategorySizeDatePackage
INSServerRequestDispatcher.javaAPI DocJava SE 5 API2933Fri Aug 26 14:54:30 BST 2005com.sun.corba.se.impl.protocol

INSServerRequestDispatcher

public class INSServerRequestDispatcher extends Object implements CorbaServerRequestDispatcher
INSServerRequestDispatcher handles all INS related discovery request. The INS Service can be registered using ORB.register_initial_reference(). This Singleton subcontract just finds the target IOR and does location forward. XXX PI points are not invoked in either dispatch() or locate() method this should be fixed in Tiger.

Fields Summary
private ORB
orb
private ORBUtilSystemException
wrapper
Constructors Summary
public INSServerRequestDispatcher(ORB orb)


         
        this.orb = orb;
	this.wrapper = ORBUtilSystemException.get( orb,
	    CORBALogDomains.RPC_PROTOCOL ) ;
    
Methods Summary
public voiddispatch(com.sun.corba.se.pept.protocol.MessageMediator mediator)

	CorbaMessageMediator request = (CorbaMessageMediator) mediator;
        // send a locate forward with the right IOR. If the insKey is not 
        // registered then it will throw OBJECT_NOT_EXIST Exception
        String insKey = new String( request.getObjectKey().getBytes(orb) );
	request.getProtocolHandler()
	    .createLocationForward(request, getINSReference( insKey ), null);
        return;
    
private com.sun.corba.se.spi.ior.IORgetINSReference(java.lang.String insKey)
getINSReference if it is registered in INSObjectKeyMap.

        IOR entry = ORBUtility.getIOR( orb.getLocalResolver().resolve( insKey ) ) ;
        if( entry != null ) {
            // If entry is not null then the locate is with an INS Object key,
            // so send a location forward with the right IOR.
            return entry;
        }

	throw wrapper.servantNotFound() ;
    
public com.sun.corba.se.spi.ior.IORlocate(com.sun.corba.se.spi.ior.ObjectKey okey)

 
        // send a locate forward with the right IOR. If the insKey is not 
        // registered then it will throw OBJECT_NOT_EXIST Exception
        String insKey = new String( okey.getBytes(orb) );
        return getINSReference( insKey );