Package org.jboss.marshalling

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


        protected final DomainModel receiveResponse(final InputStream input) throws IOException {
            final Unmarshaller unmarshaller = getUnmarshaller();
            unmarshaller.start(createByteInput(input));
            expectHeader(unmarshaller, DomainClientProtocol.RETURN_DOMAIN_MODEL);
            final DomainModel domainModel = unmarshal(unmarshaller, DomainModel.class);
            unmarshaller.finish();
            return domainModel;
        }
    }

    private class GetServerManagerNamesOperation extends DomainClientRequest<List<String>> {
View Full Code Here


            final List<String> results = new ArrayList<String>(count);
            for (int i = 0; i < count; i++) {
                expectHeader(unmarshaller, DomainClientProtocol.RETURN_HOST_NAME);
                results.add(unmarshaller.readUTF());
            }
            unmarshaller.finish();
            return results;
        }
    }

    private class GetHostModelOperation extends DomainClientRequest<HostModel> {
View Full Code Here

        protected final HostModel receiveResponse(final InputStream input) throws IOException {
            final Unmarshaller unmarshaller = getUnmarshaller();
            unmarshaller.start(createByteInput(input));
            expectHeader(unmarshaller, DomainClientProtocol.RETURN_HOST_MODEL);
            final HostModel hostModel = unmarshal(unmarshaller, HostModel.class);
            unmarshaller.finish();
            return hostModel;
        }
    }

    private class GetServerModelOperation extends DomainClientRequest<ServerModel> {
View Full Code Here

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

    private class GetServerStatusesOperation extends DomainClientRequest<Map<ServerIdentity, ServerStatus>> {
View Full Code Here

                final String serverName = unmarshaller.readUTF();
                expectHeader(unmarshaller, DomainClientProtocol.RETURN_SERVER_STATUS);
                final ServerStatus serverStatus = unmarshal(unmarshaller, ServerStatus.class);
                results.put(new ServerIdentity(hostName, groupName, serverName), serverStatus);
            }
            unmarshaller.finish();
            return results;
        }
    }

    private class StartServerOperation extends ServerStatusChangeOperation {
View Full Code Here

        protected final ServerStatus receiveResponse(final InputStream input) throws IOException {
            final Unmarshaller unmarshaller = getUnmarshaller();
            unmarshaller.start(createByteInput(input));
            expectHeader(unmarshaller, DomainClientProtocol.RETURN_SERVER_STATUS);
            final ServerStatus serverStatus = unmarshal(unmarshaller, ServerStatus.class);
            unmarshaller.finish();
            return serverStatus;
        }
    }

    private class ApplyUpdatesOperation extends DomainClientRequest<List<DomainUpdateResult<?>>> {
View Full Code Here

            for (int i = 0; i < updateCount; i++) {
                expectHeader(unmarshaller, DomainClientProtocol.RETURN_APPLY_UPDATE);
                DomainUpdateResult<?> updateResult = unmarshal(unmarshaller, DomainUpdateResult.class);
                results.add(updateResult);
            }
            unmarshaller.finish();
            return results;
        }
    }

    private class ApplyHostUpdatesOperation extends DomainClientRequest<List<HostUpdateResult<?>>> {
View Full Code Here

            for (int i = 0; i < updateCount; i++) {
                expectHeader(unmarshaller, DomainClientProtocol.RETURN_APPLY_HOST_UPDATE);
                HostUpdateResult<?> updateResult = unmarshal(unmarshaller, HostUpdateResult.class);
                results.add(updateResult);
            }
            unmarshaller.finish();
            return results;
        }
    }

    private class ApplyUpdateToModelOperation extends DomainClientRequest<DomainUpdateApplierResponse> {
View Full Code Here

        protected final DomainUpdateApplierResponse receiveResponse(final InputStream input) throws IOException {
            final Unmarshaller unmarshaller = getUnmarshaller();
            unmarshaller.start(createByteInput(input));
            expectHeader(unmarshaller, DomainClientProtocol.RETURN_APPLY_UPDATE);
            DomainUpdateApplierResponse rsp = unmarshal(unmarshaller, DomainUpdateApplierResponse.class);
            unmarshaller.finish();
            return rsp;
        }
    }

    private class ApplyUpdateToServerOperation<R, P> extends DomainClientRequest<Void> {
View Full Code Here

            final Unmarshaller unmarshaller = getUnmarshaller();
            unmarshaller.start(createByteInput(input));
            expectHeader(unmarshaller, DomainClientProtocol.RETURN_APPLY_SERVER_MODEL_UPDATE);
            @SuppressWarnings("unchecked")
            final UpdateResultHandlerResponse<R> result = unmarshal(unmarshaller, UpdateResultHandlerResponse.class);
            unmarshaller.finish();
            if (resultHandler != null) {
                if (result.isCancelled()) {
                    resultHandler.handleCancellation(param);
                }
                else if (result.isRolledBack()) {
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.