orb.java

来自「java jdk 1.4的源码」· Java 代码 · 共 1,939 行 · 第 1/5 页

JAVA
1,939
字号
     * Notifies PI of the information for client-side interceptors.       * PI will use this information as a source of information for the      * ClientRequestInfo object.     */    protected void setClientPIInfo( Connection connection,				    ClientDelegate delegate,                                     IOR effectiveTarget,                                    IIOPProfile profile,                                     int requestId,                                    String opName,                                    boolean isOneWay,                                    ServiceContexts svc )     {        // Intentionally left empty.  See above note.    }        /**     * Notifies PI of additional information for client-side interceptors.     * PI will use this information as a source of information for the     * ClientRequestInfo object.     */    protected void setClientPIInfo( ClientResponse response ) {        // Intentionally left empty.  See above note.    }    /**     * Notifies PI of additional information for client-side interceptors.     * PI will use this information as a source of information for the     * ClientRequestInfo object.     */    protected void setClientPIInfo( RequestImpl requestImpl ) {        // Intentionally left empty.  See above note.    }    /**     * Overridden from corba.ORB.     * See description in corba.ORB.     */    protected void sendCancelRequestIfFinalFragmentNotSent() {        // Intentionally left empty.  See above note.    }        /*     *****************     * Server PI hooks     *****************/        /**     * Called when the appropriate server starting interception point is     * to be invoked for all appropriate server-side request interceptors.     *     * @throws InternalRuntimeForwardRequest Thrown if an interceptor raises     *     ForwardRequest.  This is an unchecked exception so that we need      *     not modify the entire execution path to declare throwing      *     ForwardRequest.     */    protected void invokeServerPIStartingPoint()         throws InternalRuntimeForwardRequest    {        // Intentionally left empty.  See above note.    }        /**     * Called when the appropriate server intermediate interception point is     * to be invoked for all appropriate server-side request interceptors.     *     * @throws InternalRuntimeForwardRequest Thrown if an interceptor raises     *     ForwardRequest.  This is an unchecked exception so that we need      *     not modify the entire execution path to declare throwing      *     ForwardRequest.     */    protected void invokeServerPIIntermediatePoint()         throws InternalRuntimeForwardRequest    {        // Intentionally left empty.  See above note.    }        /**     * Called when the appropriate server ending interception point is     * to be invoked for all appropriate server-side request interceptors.     *     * @param replyMessage The iiop.messages.ReplyMessage containing the     *     reply status.  The ior in this object may be modified by the PIORB.     * @throws InternalRuntimeForwardRequest Thrown if an interceptor raises     *     ForwardRequest.  This is an unchecked exception so that we need      *     not modify the entire execution path to declare throwing      *     ForwardRequest.     */    protected void invokeServerPIEndingPoint( ReplyMessage replyMessage )        throws InternalRuntimeForwardRequest    {        // Intentionally left empty.  See above note.    }        /**     * Notifies PI to start a new server request and set initial     * information for server-side interceptors.     * PI will use this information as a source of information for the     * ServerRequestInfo object.  poaimpl is declared as an Object so that     * we need not introduce a dependency on the POA package.     */    protected void initializeServerPIInfo( ServerRequest request, 	java.lang.Object poaimpl, byte[] objectId, byte[] adapterId )     {        // Intentionally left empty.  See above note.    }        /**     * Notifies PI of additional information reqired for ServerRequestInfo.     *     * @param servant The servant.  This is java.lang.Object because in the     *     POA case, this will be a org.omg.PortableServer.Servant whereas     *     in the ServerDelegate case this will be an ObjectImpl.     * @param targetMostDerivedInterface.  The most derived interface.  This     *     is passed in instead of calculated when needed because it requires     *     extra information in the POA case that we didn't want to bother     *     creating extra methods for to pass in.     */    protected void setServerPIInfo( java.lang.Object servant, 				    String targetMostDerivedInterface )     {        // Intentionally left empty.  See above note.    }        /**     * Notifies PI of additional information required for ServerRequestInfo.     */    protected void setServerPIInfo( Exception exception ) {        // Intentionally left empty.  See above note.    }    /**     * Notifies PI of additional information for server-side interceptors.     * PI will use this information as a source of information for the     * ServerRequestInfo object.  These are the arguments for a DSI request.     */    protected void setServerPIInfo( NVList arguments ) {        // Intentionally left empty.  See above note.    }    /**     * Notifies PI of additional information for server-side interceptors.     * PI will use this information as a source of information for the     * ServerRequestInfo object.  This is the exception of a DSI request.     */    protected void setServerPIExceptionInfo( Any exception ) {        // Intentionally left empty.  See above note.    }    /**     * Notifies PI of additional information for server-side interceptors.     * PI will use this information as a source of information for the     * ServerRequestInfo object.  This is the result of a DSI request.     */    protected void setServerPIInfo( Any result ) {        // Intentionally left empty.  See above note.    }    /**     * Invoked when a request is about to be cleaned up.  Must be called     * after ending points are called so that the info object on the stack     * can be deinitialized and popped from the stack at the appropriate     * time.     */    protected void cleanupServerPIRequest() {        // Intentionally left empty.  See above note.    }    /*************************************************************************     * The following methods deal with creation of various types of lists.     *************************************************************************/    /**     * Create an NVList     *     * @param count	size of list to create     * @result		NVList created     *     * @see NVList     */    public NVList create_list(int count)    {        checkShutdownState();        return new NVListImpl(this, count);    }    /**     * Create an NVList corresponding to an OperationDef     *     * @param oper	operation def to use to create list     * @result		NVList created     *     * @see NVList     */    public NVList create_operation_list(org.omg.CORBA.Object oper)    {        checkShutdownState();        throw new NO_IMPLEMENT();    }    /**     * Create a NamedValue     *     * @result		NamedValue created     */    public NamedValue create_named_value(String s, Any any, int flags)    {        checkShutdownState();	return new NamedValueImpl(this, s, any, flags);    }    /**     * Create an ExceptionList     *     * @result		ExceptionList created     */    public org.omg.CORBA.ExceptionList create_exception_list()    {        checkShutdownState();	return new ExceptionListImpl();    }    /**     * Create a ContextList     *     * @result		ContextList created     */    public org.omg.CORBA.ContextList create_context_list()    {        checkShutdownState();        return new ContextListImpl(this);    }    /**     * Get the default Context object     *     * @result		the default Context object     */    public org.omg.CORBA.Context get_default_context()    {        checkShutdownState();        throw new NO_IMPLEMENT();    }    /**     * Create an Environment     *     * @result		Environment created     */    public org.omg.CORBA.Environment create_environment()    {        checkShutdownState();        return new EnvironmentImpl();    }/**************************************************************************** * The following methods deal with multiple/deferred DII invocations. ****************************************************************************/    public void send_multiple_requests_oneway(Request[] req)    {        checkShutdownState();        // Invoke the send_oneway on each new Request        for (int i = 0; i < req.length; i++) {            req[i].send_oneway();        }    }     /**     * Send multiple dynamic requests asynchronously.     *     * @param req         an array of request objects.     */    public void send_multiple_requests_deferred(Request[] req)    {        checkShutdownState();        // add the new Requests to pending dynamic Requests        for (int i = 0; i < req.length; i++) {            _dynamicRequests.addElement(req[i]);        }         // Invoke the send_deferred on each new Request        for (int i = 0; i < req.length; i++) {	    AsynchInvoke invokeObject = new AsynchInvoke(		this, (com.sun.corba.se.internal.corba.RequestImpl)req[i], true);	    new Thread(invokeObject).start();        }    }    /**     * Find out if any of the deferred invocations have a response yet.      */    public boolean poll_next_response()    {        checkShutdownState();        Request currRequest;         // poll on each pending request        Enumeration ve = _dynamicRequests.elements();        while (ve.hasMoreElements() == true) {            currRequest = (Request)ve.nextElement();            if (currRequest.poll_response() == true) {                return true;            }        }        return false;    }     /**     * Get the next request that has gotten a response.     *     * @result            the next request ready with a response.     */    public org.omg.CORBA.Request get_next_response()        throws org.omg.CORBA.WrongTransaction    {        checkShutdownState();	while (true) {	    // check if there already is a response	    synchronized ( _dynamicRequests ) {		Enumeration elems = _dynamicRequests.elements();		while ( elems.hasMoreElements() ) {		    Request currRequest = (Request)elems.nextElement();		    if ( currRequest.poll_response() ) {			// get the response for this successfully polled Request			currRequest.get_response();			_dynamicRequests.removeElement(currRequest);			return currRequest;		    }		}	    }	    // wait for a response	    synchronized(this._svResponseReceived) {	        this._svResponseReceived.reset();		while (this._svResponseReceived.value() == false) {    		    try {		        this._svResponseReceived.wait();    		    } catch(java.lang.InterruptedException ex) {}		}		// reinitialize the response flag		this._svResponseReceived.reset();	    }	}    }    /**      * Notify response to ORB for get_next_response     */    synchronized void notifyResponse() {        this._svResponseReceived.set();        this._svResponseReceived.notify();    }/**************************************************************************** * The following methods deal with stringifying/destringifying * and connecting/disconnecting object references. ****************************************************************************/    /**     * Convert an object ref to a string.     * @param obj The object to stringify.     * @return A stringified object reference.     */    public String object_to_string(org.omg.CORBA.Object obj)     {        checkShutdownState();        // Handle the null objref case        if (obj == null) 	    return IOR.NULL.stringify(this);	if (! (obj instanceof ObjectImpl)) {	    throw new MARSHAL("Argument is not an ObjectImpl.",			      MinorCodes.NOT_AN_OBJECT_IMPL,			      CompletionStatus.COMPLETED_NO);	}	// Try and get the objref's delegate if it exists        ClientSubcontract rep=null;        ObjectImpl oi = (ObjectImpl)obj;        try {	    // th

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?