src/share/classes/org/omg/CORBA/portable/InvokeHandler.java

Tue, 25 Mar 2008 14:42:28 -0700

author
ohair
date
Tue, 25 Mar 2008 14:42:28 -0700
changeset 5
5e61d5df6258
parent 1
55540e827aef
child 158
91006f157c46
permissions
-rw-r--r--

6627817: Remove ^M characters in all files (Makefiles too)
Summary: Some files included the use of the ^M character, which has been deleted
Reviewed-by: xdono

     1 /*
     2  * Copyright 1998-1999 Sun Microsystems, Inc.  All Rights Reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Sun designates this
     8  * particular file as subject to the "Classpath" exception as provided
     9  * by Sun in the LICENSE file that accompanied this code.
    10  *
    11  * This code is distributed in the hope that it will be useful, but WITHOUT
    12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    14  * version 2 for more details (a copy is included in the LICENSE file that
    15  * accompanied this code).
    16  *
    17  * You should have received a copy of the GNU General Public License version
    18  * 2 along with this work; if not, write to the Free Software Foundation,
    19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    20  *
    21  * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
    22  * CA 95054 USA or visit www.sun.com if you need additional information or
    23  * have any questions.
    24  */
    25 package org.omg.CORBA.portable;
    27 /**
    28 This interface provides a dispatching mechanism for an incoming call.
    29 It is invoked by the ORB to dispatch a request to a servant.
    30 */
    32 public interface InvokeHandler {
    33     /**
    34      * Invoked by the ORB to dispatch a request to the servant.
    35      *
    36      * ORB passes the method name, an InputStream containing the
    37      * marshalled arguments, and a ResponseHandler which the servant
    38      * uses to construct a proper reply.
    39      *
    40      * Only CORBA SystemException may be thrown by this method.
    41      *
    42      * The method must return an OutputStream created by the
    43      * ResponseHandler which contains the marshalled reply.
    44      *
    45      * A servant must not retain a reference to the ResponseHandler
    46      * beyond the lifetime of a method invocation.
    47      *
    48      * Servant behaviour is defined as follows:
    49      * <p>1. Determine correct method, and unmarshal parameters from
    50      *    InputStream.
    51      * <p>2. Invoke method implementation.
    52      * <p>3. If no user exception, create a normal reply using
    53      *    ResponseHandler.
    54      * <p>4. If user exception occurred, create exception reply using
    55      *    ResponseHandler.
    56      * <p>5. Marshal reply into OutputStream returned by
    57      *    ResponseHandler.
    58      * <p>6. Return OutputStream to ORB.
    59      * <p>
    60      * @param method The method name.
    61      * @param input The <code>InputStream</code> containing the marshalled arguments.
    62      * @param handler The <code>ResponseHandler</code> which the servant uses
    63      * to construct a proper reply
    64      * @return The <code>OutputStream</code> created by the
    65      * ResponseHandler which contains the marshalled reply
    66      * @throws SystemException is thrown when invocation fails due to a CORBA system exception.
    67      */
    69     OutputStream _invoke(String method, InputStream input,
    70                          ResponseHandler handler)
    71         throws org.omg.CORBA.SystemException;
    72 }

mercurial