Package com.starlight.locale

Examples of com.starlight.locale.FormattedTextResourceKey


  public Object lookup( String name ) throws ObjectNotBoundException {
    map_lock.lock();
    try {
      Object obj = proxy_map.get( name );
      if ( obj == null ) {
        throw new ObjectNotBoundException( new FormattedTextResourceKey(
          Resources.OBJECT_NOT_BOUND, name ) );
      }
      else return obj;
    }
    finally {
View Full Code Here


        break;

      default:
        assert false : "Unknown type: " + message.getType();
        throw new CloseSessionIndicator( new SessionCloseIMessage(
          new FormattedTextResourceKey( Resources.UNKNOWN_MESSAGE_TYPE,
          message.getType().name() ), false ) );
    }

    return response;
  }
View Full Code Here

    byte proto_version = ProtocolVersions.negotiateProtocolVersion(
      message.getMinProtocolVersion(), message.getPrefProtocolVersion() );
    if ( proto_version < 0 ) {
      throw new CloseSessionIndicator( new SessionCloseIMessage(
        new FormattedTextResourceKey( Resources.INCOMPATIBLE_PROTOCOL_VERSION,
        Byte.valueOf( ProtocolVersions.MIN_PROTOCOL_VERSION ),
        Byte.valueOf( ProtocolVersions.PROTOCOL_VERSION ),
        Byte.valueOf( message.getMinProtocolVersion() ),
        Byte.valueOf( message.getPrefProtocolVersion() ) ), false ) );
    }
View Full Code Here

      finally {
        drop_instance.object_map_lock.unlock();
      }

      if ( slot == null ) {
        throw new IllegalStateException( new FormattedTextResourceKey(
          Resources.ERROR_UNKNOWN_ID, id ).getValue() );
      }
      else slot.set( object );

      return;
View Full Code Here

    }

    // Make sure we're expecting the object
    if ( slot == null ) {
      throw new ChannelRejectedException(
        new FormattedTextResourceKey( Resources.ERROR_UNKNOWN_ID, attachment ) );
    }
    // Make sure the object hasn't already been read
    else if ( slot.get() != null ) {
      throw new ChannelRejectedException(
        new FormattedTextResourceKey( Resources.ERROR_SLOT_FULL, attachment ) );
    }

    new ChannelReader( channel, slot ).start();
  }
View Full Code Here

        response = message_handler.receivedMessage( session_info,
          ( IMessage ) message );
      }
      catch( ClassCastException ex ) {
        throw new CloseSessionIndicator( new SessionCloseIMessage(
          new FormattedTextResourceKey( Resources.INVALID_MESSAGE_TYPE,
          message.getClass().getName() ), false ) );
      }
    }
    catch ( final CloseSessionIndicator close_indicator ) {
      thread_pool.execute( new Runnable() {
View Full Code Here

    }
    catch( Exception ex ) {
      LOG.info( "Error while decoding session init vmid/args", ex );

      // Write an error, close the session and return nothing
      session.write( new SessionCloseIMessage( new FormattedTextResourceKey(
        Resources.ERROR_DESERIALIZING_SESSION_INIT_INFO, ex.toString() ),
        false ) );
      CloseHandler.close( session );
      return null;
    }
View Full Code Here

    }
    catch( Exception ex ) {
      LOG.info( "Error while decoding session init response vmid", ex );

      // Write an error, close the session and return nothing
      session.write( new SessionCloseIMessage( new FormattedTextResourceKey(
        Resources.ERROR_DESERIALIZING_SESSION_INIT_INFO, ex.toString() ),
        false ) );
      CloseHandler.close( session );
      return null;
    }
View Full Code Here

      catch( Exception ex ) {
      LOG.info( "Error while decoding channel init attachment", ex );

        // Write an error, close the session and return nothing
        session.write( new ChannelInitResponseIMessage( request_id,
          new FormattedTextResourceKey(
          Resources.ERROR_DESERIALIZING_CHANNEL_ATTACHMENT, ex.toString() ) ) );
        CloseHandler.close( session );
        return null;
      }
    }
View Full Code Here

TOP

Related Classes of com.starlight.locale.FormattedTextResourceKey

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.