Package test.iiopplugin

Source Code of test.iiopplugin.ServiceContextInterceptor

/**
*
* Licensed to the Apache Software Foundation (ASF) under one or more
*  contributor license agreements.  See the NOTICE file distributed with
*  this work for additional information regarding copyright ownership.
*  The ASF licenses this file to You under the Apache License, Version 2.0
*  (the "License"); you may not use this file except in compliance with
*  the License.  You may obtain a copy of the License at
*
*     http://www.apache.org/licenses/LICENSE-2.0
*
*  Unless required by applicable law or agreed to in writing, software
*  distributed under the License is distributed on an "AS IS" BASIS,
*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*  See the License for the specific language governing permissions and
*  limitations under the License.
*/


/**
* @version $Rev: 491396 $ $Date: 2006-12-31 01:06:13 -0500 (Sun, 31 Dec 2006) $
*/

package test.iiopplugin;

import java.net.Socket;

import org.apache.yoko.orb.PortableInterceptor.ServerRequestInfoExt;
import org.apache.yoko.orb.OCI.TransportInfo;
import org.apache.yoko.orb.OCI.IIOP.TransportInfo_impl;
import org.omg.CORBA.LocalObject;
import org.omg.PortableInterceptor.ServerRequestInfo;
import org.omg.PortableInterceptor.ServerRequestInterceptor;

/**
* @version $Revision: 491396 $ $Date: 2006-12-31 01:06:13 -0500 (Sun, 31 Dec 2006) $
*/
final class ServiceContextInterceptor extends LocalObject implements ServerRequestInterceptor {
    public ServiceContextInterceptor() {
    }

    public void receive_request(ServerRequestInfo ri) {
    }

    public void receive_request_service_contexts(ServerRequestInfo ri) {
        ServerRequestInfoExt riExt = (ServerRequestInfoExt) ri;
        TransportInfo_impl connection = (TransportInfo_impl)riExt.getTransportInfo();
        if (connection != null) {
            Socket socket = connection.socket();
            if (socket != null) {
                System.out.println("Retrieved socket successfully");
                return;
            }
        }
    }

    public void send_exception(ServerRequestInfo ri) {
    }

    public void send_other(ServerRequestInfo ri) {
    }

    public void send_reply(ServerRequestInfo ri) {
    }

    public void destroy() {
    }

    public String name() {
        return "test.iiopplugin.ServiceContextInterceptor";
    }
}
TOP

Related Classes of test.iiopplugin.ServiceContextInterceptor

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.