Package org.jboss.marshalling

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


                ProtocolUtils.expectHeader(unmarshaller, ServerManagerProtocol.PARAM_MODEL_UPDATE_RESPONSE);
                @SuppressWarnings("unchecked")
                final ModelUpdateResponse<List<ServerIdentity>> response = unmarshal(unmarshaller, ModelUpdateResponse.class);
                responses.add(response);
            }
            unmarshaller.finish();
            return responses;
        }
    }

    private class UpdateHostModelRequest extends ServerManagerRequest<List<HostUpdateResult<?>>> {
View Full Code Here


            for(int i = 0; i < responseCount; i++) {
                ProtocolUtils.expectHeader(unmarshaller, ServerManagerProtocol.PARAM_MODEL_UPDATE_RESPONSE);
                final HostUpdateResult<?> response = unmarshal(unmarshaller, HostUpdateResult.class);
                responses.add(response);
            }
            unmarshaller.finish();
            return responses;
        }
    }

    private class UpdateServerModelRequest extends ServerManagerRequest<List<UpdateResultHandlerResponse<?>>> {
View Full Code Here

            for(int i = 0; i < responseCount; i++) {
                ProtocolUtils.expectHeader(unmarshaller, ServerManagerProtocol.PARAM_MODEL_UPDATE_RESPONSE);
                final UpdateResultHandlerResponse<?> response = unmarshal(unmarshaller, UpdateResultHandlerResponse.class);
                responses.add(response);
            }
            unmarshaller.finish();
            return responses;
        }
    }

    private class GetServerStatusesRequest extends ServerManagerRequest<Map<ServerIdentity, ServerStatus>> {
View Full Code Here

        protected ServerModel receiveResponse(final InputStream input) throws IOException {
            final Unmarshaller unmarshaller = getUnmarshaller();
            unmarshaller.start(createByteInput(input));
            ProtocolUtils.expectHeader(unmarshaller, ServerManagerProtocol.RETURN_SERVER_MODEL);
            final ServerModel response = unmarshal(unmarshaller, ServerModel.class);
            unmarshaller.finish();
            return response;
        }
    }

    private class StartServerRequest extends ServerStatusChangeRequest {
View Full Code Here

        try {
            Unmarshaller unmarshaller = this.marshallerFactory.createUnmarshaller(this.configuration);
            unmarshaller.start(Marshalling.createByteInput(FISAction.open(file)));
            try {
                V value = (V) unmarshaller.readObject();
                unmarshaller.finish();
                return value;
            } finally {
                unmarshaller.close();
                DeleteFileAction.delete(file);
            }
View Full Code Here

            } catch (ClassNotFoundException cnfe) {
                // TODO: Write out invocation failure to channel outstream
                throw new RuntimeException(cnfe);
            }
            // done with unmarshalling
            unmarshaller.finish();

            runnable = new Runnable() {

                @Override
                public void run() {
View Full Code Here

            if (this.bytes != null) {
                Unmarshaller unmarshaller = context.createUnmarshaller();
                try {
                    unmarshaller.start(Marshalling.createByteInput(ByteBuffer.wrap(this.bytes)));
                    this.object = (T) unmarshaller.readObject();
                    unmarshaller.finish();
                    this.bytes = null;
                } finally {
                    unmarshaller.close();
                }
            }
View Full Code Here

                try {
                    in = new FileInputStream(timerFile);
                    unmarshaller.start(new InputStreamByteInput(in));
                    final TimerEntity entity = unmarshaller.readObject(TimerEntity.class);
                    timers.put(entity.getId(), entity);
                    unmarshaller.finish();
                } catch (Exception e) {
                    ROOT_LOGGER.failToRestoreTimersFromFile(timerFile, e);
                } finally {
                    if (in != null) {
                        try {
View Full Code Here

                // write out the failure
                MethodInvocationMessageHandler.this.writeException(channelAssociation, MethodInvocationMessageHandler.this.marshallerFactory, invocationId, cnfe, null);
                return;
            }
            // done with unmarshalling
            unmarshaller.finish();

            runnable = new Runnable() {

                @Override
                public void run() {
View Full Code Here

            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) {
                    // TODO activate host controller client service
                }
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.