Examples of GIOPConnection


Examples of org.jacorb.orb.giop.GIOPConnection

    public void receive_request_service_contexts( ServerRequestInfo ri )
        throws ForwardRequest
    {
        ServerRequest request = ((ServerRequestInfoImpl) ri).request;
        GIOPConnection connection = request.getConnection();

        // lookup for context
        if (connection == null)
        {
            if (logger.isErrorEnabled())
                logger.error("target has no connection!");
            return;
        }

        if( !connection.isSSL() )
        {
            return;
        }

        ServerIIOPConnection transport =
            (ServerIIOPConnection)connection.getTransport();

        SSLSocket sslSocket = (SSLSocket)transport.getSocket();

        javax.net.ssl.SSLSession session = sslSocket.getSession();
View Full Code Here

Examples of org.jacorb.orb.giop.GIOPConnection

          }

        if (sasContext == null)
            return;

        GIOPConnection connection =
            ((ServerRequestInfoImpl) ri).request.getConnection();

        // verify SSL requirements
        if (useSsl && !connection.isSSL())
        {
            if (logger.isErrorEnabled())
                logger.error("SSL required for operation " + ri.operation());
            throw new org.omg.CORBA.NO_PERMISSION("SSL Required!",
                                                  MinorCodes.SAS_TSS_FAILURE,
View Full Code Here

Examples of org.jacorb.orb.giop.GIOPConnection

        if (logger.isDebugEnabled())
            logger.debug("receive_request for "+ri.operation());

        if (sasContext == null)
            return;
        GIOPConnection connection =
            ((ServerRequestInfoImpl) ri).request.getConnection();

        // check policy
        SASPolicyValues sasValues = null;
        try
View Full Code Here

Examples of org.jacorb.orb.giop.GIOPConnection

                        new ServerIIOPConnection (socket,
                                                  false,
                                                  new NullTCPConnectionListener() ); // TODO // no SSL
                    transport.configure(configuration);

                    GIOPConnection connection =
                    new ServerGIOPConnection( transport.get_server_profile(),
                                              transport,
                                              request_listener,
                                              reply_listener,
                                              null,
                                              null);
                    connection.configure(configuration);
                    receptor_pool.connectionCreated( connection );
                }
                catch (Exception _e)
                {
                    // when finishing, we do a close() on
View Full Code Here

Examples of org.jacorb.orb.giop.GIOPConnection

     * allowed, it shall ignore the passed instance and
     * return false.
     */
    public boolean add_input (org.omg.ETF.Connection conn)
    {
        GIOPConnection giopConnection =
            giop_connection_manager.createServerGIOPConnection
            (
                conn.get_server_profile(),
                conn,
                request_listener,
View Full Code Here

Examples of org.jacorb.orb.giop.GIOPConnection

        }
        catch (Exception e)
        {
        }

        GIOPConnection conn =
            giopconn_mg.createServerGIOPConnection( null,
                                                    transport,
                                                    request_listener,
                                                    reply_listener );

        try
        {
            //will not return until an IOException is thrown (by the
            //DummyTransport)
            conn.receiveMessages();
        }
        catch( IOException e )
        {
            //o.k., thrown by DummyTransport
        }

        //no request or reply must have been handed over
        assertTrue( request_listener.getRequest() == null );
        assertTrue( reply_listener.getReply() == null );

        //instead, an error message have must been sent via the
        //transport
        assertTrue( transport.getWrittenMessage() != null );

        byte[] result = transport.getWrittenMessage();

        assertTrue( Messages.getMsgType( result ) == MsgType_1_1._MessageError );
        MessageOutputStream m_out =
            new MessageOutputStream(orb);
        m_out.writeGIOPMsgHeader( MsgType_1_1._Fragment,
                                     0 // giop minor
                                     );
        m_out.write_ulong( 0 ); // Fragment Header (request id)
        m_out.write_octet( (byte) 'b' );
        m_out.write_octet( (byte) 'a' );
        m_out.write_octet( (byte) 'z' );
        m_out.insertMsgSize();

        messages.add( m_out.getBufferCopy() );

        try
        {
            //will not return until an IOException is thrown (by the
            //DummyTransport)
            conn.receiveMessages();
        }
        catch( IOException e )
        {
            //o.k., thrown by DummyTransport
        }
View Full Code Here

Examples of org.jacorb.orb.giop.GIOPConnection

        }
        catch (Exception e)
        {
        }

        GIOPConnection conn =
            giopconn_mg.createServerGIOPConnection( null,
                                                    transport,
                                                    request_listener,
                                                    reply_listener );

        try
        {
            //will not return until an IOException is thrown (by the
            //DummyTransport)
            conn.receiveMessages();
        }
        catch( IOException e )
        {
            //o.k., thrown by DummyTransport
        }
View Full Code Here

Examples of org.jacorb.orb.giop.GIOPConnection

        }
        catch (Exception e)
        {
        }

        GIOPConnection conn =
            giopconn_mg.createServerGIOPConnection( null,
                                                    transport,
                                                    request_listener,
                                                    reply_listener );

        try
        {
            //will not return until an IOException is thrown (by the
            //DummyTransport)
            conn.receiveMessages();
        }
        catch( IOException e )
        {
            //o.k., thrown by DummyTransport
        }

        //no request or reply must have been handed over
        assertTrue( request_listener.getRequest() == null );
        assertTrue( reply_listener.getReply() == null );

        //instead, an error message have must been sent via the
        //transport
        assertTrue( transport.getWrittenMessage() != null );

        byte[] result = transport.getWrittenMessage();

        ReplyInputStream r_in = new ReplyInputStream( getORB(), result );

        Exception ex = r_in.getException();
        if ( ex != null && ex.getClass() == org.omg.CORBA.NO_IMPLEMENT.class )
        {
            // o.k.
        }
        else
        {
            fail();
        }

        MessageOutputStream m_out =
            new MessageOutputStream(orb);
        m_out.writeGIOPMsgHeader( MsgType_1_1._Fragment,
                                  1 // giop minor
                                  );
        m_out.write_ulong( 0 ); // Fragment Header (request id)
        m_out.write_octet( (byte) 'b' );
        m_out.write_octet( (byte) 'a' );
        m_out.write_octet( (byte) 'z' );
        m_out.insertMsgSize();

        messages.add( m_out.getBufferCopy() );

        try
        {
            //will not return until an IOException is thrown (by the
            //DummyTransport)
            conn.receiveMessages();
        }
        catch( IOException e )
        {
            //o.k., thrown by DummyTransport
        }
View Full Code Here

Examples of org.jacorb.orb.giop.GIOPConnection

        }
        catch (Exception e)
        {
        }

        GIOPConnection conn =
            giopconn_mg.createServerGIOPConnection( null,
                                                    transport,
                                                    request_listener,
                                                    reply_listener );

        try
        {
            //will not return until an IOException is thrown (by the
            //DummyTransport)
            conn.receiveMessages();
        }
        catch( IOException e )
        {
            //o.k., thrown by DummyTransport
        }
View Full Code Here

Examples of org.jacorb.orb.giop.GIOPConnection

     * return false.
     */
    @Override
    public boolean add_input (org.omg.ETF.Connection conn)
    {
        GIOPConnection giopConnection =
            giop_connection_manager.createServerGIOPConnection
            (
                conn.get_server_profile(),
                conn,
                request_listener,
View Full Code Here
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.