Package de.netseeker.ejoe.adapter

Examples of de.netseeker.ejoe.adapter.SerializeAdapter


     */
    public Object process( Object param ) throws Exception
    {
        ByteArrayInputStream in =null;
        ByteArrayOutputStream out = null;
        SerializeAdapter adapter = AdapterFactory.createAdapter( getSenderInfo().getAdapterName() );
        Object request = null;
        Object result = null;

        boolean compressed = getSenderInfo().hasCompression() && getReceiverInfo().hasCompression();

View Full Code Here


            if ( this._senderInfo != null )
            {
                log.log( Level.FINEST, "Remote requested " + this._senderInfo.getAdapterName() );

                SerializeAdapter adapter = AdapterFactory.createAdapter( this._senderInfo.getAdapterName() );

                if ( this._receiverInfo.hasNonBlockingReadWrite() )
                {
                    log.log( Level.FINEST, "Going to read client request on a non blocking socket..." );
                    request = read( adapter );
View Full Code Here

     */
    private void write() throws IOException
    {
        ByteBufferOutputStream out = null;
        ByteBuffer dataBuf = null;
        SerializeAdapter adapter = this._receiverInfo.getAdapterName() != null ? AdapterFactory
                .createAdapter( this._receiverInfo.getAdapterName() ) : null;
        WritableByteChannel channel = this._receiverInfo.getChannel();
        DataChannel dataChannel = DataChannel.getInstance( this._receiverInfo );

        try
View Full Code Here

    /**
     * @throws IOException
     */
    private void writeBlocked() throws IOException
    {
        SerializeAdapter adapter = this._receiverInfo.getAdapterName() != null ? AdapterFactory
                .createAdapter( this._receiverInfo.getAdapterName() ) : null;

        log.log( Level.FINE, "Going to send server response... " );
        if ( !this._receiverInfo.isDirect() )
        {
View Full Code Here

            {
                log.debug( "EJOE Server address: " + ContentStringBuilder.toString( address ) );
                log.debug( "Will use serialize adapter: " + adapterKey );
            }

            SerializeAdapter adapter = AdapterFactory.createAdapter( adapterKey );

            int index = address[1].lastIndexOf( ':' );
            String host = address[1].substring( 0, index );
            String sPort = address[1].substring( index + 1 );
            int port = Integer.parseInt( sPort );
View Full Code Here

                            + (result != null ? (result.getClass().getName() + ':' + result) : "null");
                }
                else
                {
                    ByteArrayOutputStream bOut = new ByteArrayOutputStream();
                    SerializeAdapter adpt = adapters[i];
                    try
                    {
                        if ( runs == 1 || runs == 3 )
                        {
                            DeflaterOutputStream sOut = new GZIPOutputStream( bOut, EJConstants.BUFFERED_STREAM_SIZE )
                                {
                                    {
                                        def.setLevel( EJConstants.DEFAULT_COMPRESSION_LEVEL );
                                    }
                                };
                            adpt.write( new ObjectBean(), sOut );
                            sOut.finish();
                            sOut.close();
                        }
                        else
                        {
                            adpt.write( new ObjectBean(), bOut );
                        }
                        msgs[1] = String.valueOf( bOut.size() );
                    }
                    catch ( Exception e )
                    {
View Full Code Here

TOP

Related Classes of de.netseeker.ejoe.adapter.SerializeAdapter

Copyright © 2018 www.massapicom. 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.