Search in sources :

Example 1 with BDBConfiguredObjectRecord

use of org.apache.qpid.server.store.berkeleydb.BDBConfiguredObjectRecord in project qpid-broker-j by apache.

the class ConfiguredObjectBinding method entryToObject.

@Override
public BDBConfiguredObjectRecord entryToObject(TupleInput tupleInput) {
    String type = tupleInput.readString();
    String json = tupleInput.readString();
    ObjectMapper mapper = new ObjectMapper();
    try {
        Map<String, Object> value = mapper.readValue(json, Map.class);
        BDBConfiguredObjectRecord configuredObject = new BDBConfiguredObjectRecord(_uuid, type, value);
        return configuredObject;
    } catch (IOException e) {
        // should never happen
        throw new StoreException(e);
    }
}
Also used : BDBConfiguredObjectRecord(org.apache.qpid.server.store.berkeleydb.BDBConfiguredObjectRecord) IOException(java.io.IOException) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper) StoreException(org.apache.qpid.server.store.StoreException)

Aggregations

ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)1 IOException (java.io.IOException)1 StoreException (org.apache.qpid.server.store.StoreException)1 BDBConfiguredObjectRecord (org.apache.qpid.server.store.berkeleydb.BDBConfiguredObjectRecord)1