Search in sources :

Example 6 with DataByteArrayInputStream

use of com.swiftmq.tools.util.DataByteArrayInputStream in project swiftmq-client by iitsoftware.

the class AuthResponseRequest method readContent.

/**
 * Read the content of this object from the stream.
 *
 * @param in input stream
 * @throws IOException if an error occurs
 */
public void readContent(DataInput in) throws IOException {
    super.readContent(in);
    byte set = in.readByte();
    if (set == 0) {
        response = null;
    } else {
        try {
            byte[] b = new byte[in.readInt()];
            in.readFully(b);
            response = (Serializable) (new ObjectInputStream(new DataByteArrayInputStream(b))).readObject();
        } catch (ClassNotFoundException ignored) {
        }
    }
}
Also used : DataByteArrayInputStream(com.swiftmq.tools.util.DataByteArrayInputStream)

Example 7 with DataByteArrayInputStream

use of com.swiftmq.tools.util.DataByteArrayInputStream in project swiftmq-client by iitsoftware.

the class GetAuthChallengeReply method readContent.

/**
 * Read the content of this object from the stream.
 *
 * @param in input stream
 * @throws IOException if an error occurs
 */
public void readContent(DataInput in) throws IOException {
    super.readContent(in);
    byte set = in.readByte();
    if (set == 0) {
        challenge = null;
    } else {
        try {
            byte[] b = new byte[in.readInt()];
            in.readFully(b);
            challenge = (Serializable) (new ObjectInputStream(new DataByteArrayInputStream(b))).readObject();
        } catch (ClassNotFoundException ignored) {
        }
    }
    set = in.readByte();
    if (set == 0) {
        challengeResponseFactoryClass = null;
    } else {
        challengeResponseFactoryClass = in.readUTF();
    }
}
Also used : DataByteArrayInputStream(com.swiftmq.tools.util.DataByteArrayInputStream)

Example 8 with DataByteArrayInputStream

use of com.swiftmq.tools.util.DataByteArrayInputStream in project swiftmq-client by iitsoftware.

the class GenericReply method readContent.

/**
 * Read the content of this object from the stream.
 *
 * @param in input stream
 * @throws IOException if an error occurs
 */
public void readContent(DataInput in) throws IOException {
    super.readContent(in);
    byte set = in.readByte();
    if (set == 0)
        result = null;
    else {
        try {
            byte[] b = new byte[in.readInt()];
            in.readFully(b);
            result = (Serializable) (new ObjectInputStream(new DataByteArrayInputStream(b))).readObject();
        } catch (ClassNotFoundException ignored) {
        }
    }
}
Also used : DataByteArrayInputStream(com.swiftmq.tools.util.DataByteArrayInputStream)

Example 9 with DataByteArrayInputStream

use of com.swiftmq.tools.util.DataByteArrayInputStream in project swiftmq-client by iitsoftware.

the class Reply method readContent.

/**
 * Read the content of this object from the stream.
 *
 * @param in input stream
 * @throws IOException if an error occurs
 */
public void readContent(DataInput in) throws IOException {
    ok = in.readBoolean();
    byte set = in.readByte();
    if (set == 0)
        exception = null;
    else {
        try {
            byte[] b = new byte[in.readInt()];
            in.readFully(b);
            exception = (Exception) (new ObjectInputStream(new DataByteArrayInputStream(b))).readObject();
        } catch (ClassNotFoundException ignored) {
        }
    }
    timeout = in.readBoolean();
    requestNumber = in.readInt();
}
Also used : DataByteArrayInputStream(com.swiftmq.tools.util.DataByteArrayInputStream)

Example 10 with DataByteArrayInputStream

use of com.swiftmq.tools.util.DataByteArrayInputStream in project swiftmq-client by iitsoftware.

the class ReplyRequest method readContent.

/**
 * Read the content of this object from the stream.
 *
 * @param in input stream
 * @throws IOException if an error occurs
 */
public void readContent(DataInput in) throws IOException {
    ok = in.readBoolean();
    byte set = in.readByte();
    if (set == 0)
        exception = null;
    else {
        try {
            byte[] b = new byte[in.readInt()];
            in.readFully(b);
            exception = (Exception) (new ObjectInputStream(new DataByteArrayInputStream(b))).readObject();
        } catch (ClassNotFoundException ignored) {
        }
    }
}
Also used : DataByteArrayInputStream(com.swiftmq.tools.util.DataByteArrayInputStream)

Aggregations

DataByteArrayInputStream (com.swiftmq.tools.util.DataByteArrayInputStream)68 InvalidSelectorException (javax.jms.InvalidSelectorException)22 ResourceLimitException (com.swiftmq.swiftlet.auth.ResourceLimitException)21 QueuePushTransaction (com.swiftmq.swiftlet.queue.QueuePushTransaction)21 RingBuffer (com.swiftmq.tools.collection.RingBuffer)21 JMSException (javax.jms.JMSException)21 MessageImpl (com.swiftmq.jms.MessageImpl)20 EntityList (com.swiftmq.mgmt.EntityList)15 List (java.util.List)15 InvalidDestinationException (javax.jms.InvalidDestinationException)14 TopicImpl (com.swiftmq.jms.TopicImpl)8 QueueImpl (com.swiftmq.jms.QueueImpl)7 DataByteArrayOutputStream (com.swiftmq.tools.util.DataByteArrayOutputStream)7 IOException (java.io.IOException)7 com.swiftmq.jms (com.swiftmq.jms)2 AddressString (com.swiftmq.amqp.v100.generated.messaging.message_format.AddressString)1 MessageFormat (com.swiftmq.amqp.v100.generated.transport.definitions.MessageFormat)1 CountableBufferedInputStream (com.swiftmq.impl.net.netty.CountableBufferedInputStream)1 CountableWrappedOutputStream (com.swiftmq.impl.net.netty.CountableWrappedOutputStream)1 BytesMessageImpl (com.swiftmq.jms.BytesMessageImpl)1