Package org.jboss.marshalling

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


        @Override
        protected void sendResponse(final OutputStream outputStream) throws IOException {
            ServerModel serverModel = domainController.getServerModel(serverManagerName, serverName);
            final Marshaller marshaller = getMarshaller();
            marshaller.start(createByteOutput(outputStream));
            marshaller.writeByte(DomainClientProtocol.RETURN_SERVER_MODEL);
            marshaller.writeObject(serverModel);
            marshaller.finish();
        }
    }
View Full Code Here


        }

        @Override
        protected final void sendRequest(final int protocolVersion, final OutputStream outputStream) throws IOException {
            final Marshaller marshaller = getMarshaller();
            marshaller.start(createByteOutput(outputStream));
            marshaller.writeByte(ServerManagerProtocol.PARAM_DOMAIN_MODEL);
            marshaller.writeObject(domainModel);
            marshaller.finish();
        }
    }
View Full Code Here

        }

        @Override
        protected void sendRequest(final int protocolVersion, final OutputStream output) throws IOException {
            final Marshaller marshaller = getMarshaller();
            marshaller.start(createByteOutput(output));
            marshaller.writeByte(ServerManagerProtocol.PARAM_DOMAIN_MODEL_UPDATE_COUNT);
            marshaller.writeInt(updates.size());
            for(AbstractDomainModelUpdate<?> update : updates) {
                marshaller.writeByte(ServerManagerProtocol.PARAM_DOMAIN_MODEL_UPDATE);
                marshaller.writeObject(update);
View Full Code Here

        }

        @Override
        protected void sendRequest(final int protocolVersion, final OutputStream output) throws IOException {
            final Marshaller marshaller = getMarshaller();
            marshaller.start(createByteOutput(output));
            marshaller.writeByte(ServerManagerProtocol.PARAM_HOST_MODEL_UPDATE_COUNT);
            marshaller.writeInt(updates.size());
            for(AbstractHostModelUpdate<?> update : updates) {
                marshaller.writeByte(ServerManagerProtocol.PARAM_HOST_MODEL_UPDATE);
                marshaller.writeObject(update);
View Full Code Here

        }

        @Override
        protected void sendRequest(final int protocolVersion, final OutputStream output) throws IOException {
            final Marshaller marshaller = getMarshaller();
            marshaller.start(createByteOutput(output));
            marshaller.writeByte(ServerManagerProtocol.PARAM_SERVER_NAME);
            marshaller.writeUTF(serverName);
            marshaller.writeByte(ServerManagerProtocol.PARAM_ALLOW_ROLLBACK);
            marshaller.writeBoolean(allowOverallRollback);
            marshaller.writeByte(ServerManagerProtocol.PARAM_SERVER_MODEL_UPDATE_COUNT);
View Full Code Here

        }

        @Override
        protected void sendRequest(final int protocolVersion, final OutputStream output) throws IOException {
            final Marshaller marshaller = getMarshaller();
            marshaller.start(createByteOutput(output));
            marshaller.writeByte(ServerManagerProtocol.PARAM_SERVER_NAME);
            marshaller.writeUTF(serverName);
            marshaller.finish();
        }
View Full Code Here

        }

        @Override
        protected void sendRequest(final int protocolVersion, final OutputStream output) throws IOException {
            final Marshaller marshaller = getMarshaller();
            marshaller.start(createByteOutput(output));
            marshaller.writeByte(ServerManagerProtocol.PARAM_SERVER_NAME);
            marshaller.writeUTF(serverName);
            if (gracefulTimeout != null) {
                marshaller.writeByte(ServerManagerProtocol.PARAM_GRACEFUL_TIMEOUT);
                marshaller.writeLong(gracefulTimeout);
View Full Code Here

     * Serializes an object into a byte buffer. The object has to implement interface Serializable or Externalizable
     */
    byte[] objectToByteBufferInternal(Object object) throws Exception {
        Marshaller marshaller = marshallerFactory.createMarshaller(this.marshallingConfig);
        ByteArrayOutputStream output = new ByteArrayOutputStream();
        marshaller.start(Marshalling.createByteOutput(output));
        marshaller.writeObject(object);
        marshaller.close();
        return output.toByteArray();
    }

View Full Code Here

            return new byte[] { NULL_VALUE };
        }

        Marshaller marshaller = marshallerFactory.createMarshaller(this.marshallingConfig);
        ByteArrayOutputStream output = new ByteArrayOutputStream();
        marshaller.start(Marshalling.createByteOutput(output));
        // write a marker to stream to distinguish from null value stream
        marshaller.write(SERIALIZABLE_VALUE);
        marshaller.writeObject(obj);
        marshaller.close();
        return output.toByteArray();
View Full Code Here

                    out.writeUTF(serviceName);
                    StateTransferProvider provider = entry.getValue();

                    Marshaller marshaller = marshallerFactory.createMarshaller(new MarshallingConfiguration());
                    ByteArrayOutputStream output = new ByteArrayOutputStream();
                    marshaller.start(Marshalling.createByteOutput(output));
                    marshaller.writeObject(provider.getCurrentState());
                    marshaller.close();
                    byte[] bytes = output.toByteArray();
                    out.writeInt(bytes.length);
                    out.write(bytes);
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.