Search in sources :

Example 1 with VersionedException

use of com.swiftmq.tools.versioning.VersionedException in project swiftmq-ce by iitsoftware.

the class TopicInfoFactory method createDumpable.

protected Dumpable createDumpable(Versioned versioned) throws VersionedException {
    int version = versioned.getVersion();
    Dumpable d = null;
    switch(version) {
        case 400:
            d = new com.swiftmq.impl.topic.standard.announce.v400.TopicInfoImpl();
            break;
    }
    if (d != null) {
        try {
            dis.reset();
            dis.setBuffer(versioned.getPayload(), 0, versioned.getLength());
            // dumpid
            dis.readInt();
            d.readContent(dis);
        } catch (IOException e) {
            throw new VersionedException(e.toString());
        }
    }
    return d;
}
Also used : IOException(java.io.IOException) VersionedException(com.swiftmq.tools.versioning.VersionedException) Dumpable(com.swiftmq.tools.dump.Dumpable) VersionedDumpable(com.swiftmq.tools.versioning.VersionedDumpable)

Aggregations

Dumpable (com.swiftmq.tools.dump.Dumpable)1 VersionedDumpable (com.swiftmq.tools.versioning.VersionedDumpable)1 VersionedException (com.swiftmq.tools.versioning.VersionedException)1 IOException (java.io.IOException)1