Search in sources :

Example 1 with DynamicObjectInputStream

use of com.adobe.acs.commons.util.DynamicObjectInputStream in project acs-aem-commons by Adobe-Consulting-Services.

the class EntryNodeToCacheKeyHandler method get.

public CacheKey get() throws RepositoryException, IOException, ClassNotFoundException {
    if (entryNode != null) {
        final Property cacheKeyProperty = entryNode.getProperty(JCRHttpCacheStoreConstants.PN_CACHEKEY);
        final InputStream inputStream = cacheKeyProperty.getBinary().getStream();
        final ClassLoader dynamicClassLoader = dynamicClassLoaderManager.getDynamicClassLoader();
        final DynamicObjectInputStream dynamicObjectInputStream = new DynamicObjectInputStream(inputStream, dynamicClassLoader);
        return (CacheKey) dynamicObjectInputStream.readObject();
    }
    return null;
}
Also used : DynamicObjectInputStream(com.adobe.acs.commons.util.DynamicObjectInputStream) DynamicObjectInputStream(com.adobe.acs.commons.util.DynamicObjectInputStream) InputStream(java.io.InputStream) Property(javax.jcr.Property) CacheKey(com.adobe.acs.commons.httpcache.keys.CacheKey)

Aggregations

CacheKey (com.adobe.acs.commons.httpcache.keys.CacheKey)1 DynamicObjectInputStream (com.adobe.acs.commons.util.DynamicObjectInputStream)1 InputStream (java.io.InputStream)1 Property (javax.jcr.Property)1