Package org.jboss.marshalling

Examples of org.jboss.marshalling.Unmarshaller.start()


        }

        @Override
        protected final void readRequest(final InputStream input) throws IOException {
            final Unmarshaller unmarshaller = getUnmarshaller();
            unmarshaller.start(createByteInput(input));
            expectHeader(unmarshaller, ServerManagerProtocol.PARAM_DOMAIN_MODEL);
            final DomainModel domainModel = unmarshal(unmarshaller, DomainModel.class);
            serverManager.setDomain(domainModel);
            unmarshaller.finish();
            log.info("Received domain update.");
View Full Code Here


        }

        @Override
        protected final void readRequest(final InputStream input) throws IOException {
            final Unmarshaller unmarshaller = getUnmarshaller();
            unmarshaller.start(createByteInput(input));
            expectHeader(unmarshaller, ServerManagerProtocol.PARAM_DOMAIN_MODEL_UPDATE_COUNT);
            int count = unmarshaller.readInt();
            updates = new ArrayList<AbstractDomainModelUpdate<?>>(count);
            for(int i = 0; i < count; i++) {
                expectHeader(unmarshaller, ServerManagerProtocol.PARAM_DOMAIN_MODEL_UPDATE);
View Full Code Here

        }

        @Override
        protected final List<UpdateResultHandlerResponse<?>> receiveResponse(final InputStream input) throws IOException {
            final Unmarshaller unmarshaller = getUnmarshaller();
            unmarshaller.start(createByteInput(input));
            expectHeader(unmarshaller, DomainServerProtocol.PARAM_SERVER_MODEL_UPDATE_RESPONSE_COUNT);
            final int updateCount = unmarshaller.readInt();
            final List<UpdateResultHandlerResponse<?>> results = new ArrayList<UpdateResultHandlerResponse<?>>(updateCount);
            for (int i = 0; i < updateCount; i++) {
                expectHeader(unmarshaller, DomainServerProtocol.PARAM_SERVER_MODEL_UPDATE_RESPONSE);
View Full Code Here

        }

        @Override
        protected final ServerModel receiveResponse(final InputStream input) throws IOException {
            final Unmarshaller unmarshaller = getUnmarshaller();
            unmarshaller.start(createByteInput(input));
            expectHeader(unmarshaller, DomainServerProtocol.RETURN_SERVER_MODEL);
            ServerModel serverModel = unmarshal(unmarshaller, ServerModel.class);
            unmarshaller.finish();
            return serverModel;
        }
View Full Code Here

            final MarshallingConfiguration configuration = new MarshallingConfiguration();
            configuration.setVersion(2);
            configuration.setClassResolver(new SimpleClassResolver(DomainServerMain.class.getClassLoader()));
            unmarshaller = factory.createUnmarshaller(configuration);
            byteInput = Marshalling.createByteInput(initialInput);
            unmarshaller.start(byteInput);
            final ServerTask task = unmarshaller.readObject(ServerTask.class);
            unmarshaller.finish();
            containerFuture = task.run(Arrays.<ServiceActivator>asList(new ServiceActivator() {
                @Override
                public void activate(final ServiceActivatorContext serviceActivatorContext) {
View Full Code Here

      if (isReentrant) {
         unmarshaller = factory.createUnmarshaller(configuration);
      } else {
         unmarshaller = unmarshallerTL.get();
      }
      unmarshaller.start(Marshalling.createByteInput(is));
      return unmarshaller;
   }

   public void finishObjectInput(ObjectInput oi) {
      try {
View Full Code Here

        assertTrue(encoder.finish());

        ChannelBuffer buffer = encoder.poll();

        Unmarshaller unmarshaller = marshallerFactory.createUnmarshaller(configuration);
        unmarshaller.start(Marshalling.createByteInput(truncate(buffer).toByteBuffer()));
        String read = (String) unmarshaller.readObject();
        assertEquals(testObject, read);

        assertEquals(-1, unmarshaller.read());
View Full Code Here

        Unmarshaller unmarshaller = provider.getUnmarshaller(ctx);
        ByteInput input = new ChannelBufferByteInput(frame);

        try {
            unmarshaller.start(input);
            Object obj = unmarshaller.readObject();
            unmarshaller.finish();
            return obj;
        } finally {
            // Call close in a finally block as the ReplayingDecoder will throw an Error if not enough bytes are
View Full Code Here

        ByteInput input = new ChannelBufferByteInput(buffer);
        if (maxObjectSize != Integer.MAX_VALUE) {
            input = new LimitingByteInput(input, maxObjectSize);
        }
        try {
            unmarshaller.start(input);
            Object obj = unmarshaller.readObject();
            unmarshaller.finish();
            return obj;
        } catch (LimitingByteInput.TooBigObjectException e) {
            discardingTooLongFrame = true;
View Full Code Here

      if (isReentrant) {
         unmarshaller = factory.createUnmarshaller(configuration);
      } else {
         unmarshaller = unmarshallerTL.get();
      }
      unmarshaller.start(Marshalling.createByteInput(is));
      return unmarshaller;
   }

   public void finishObjectInput(ObjectInput oi) {
      try {
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.