Nuxeo Enterprise Platform 5.4

org.nuxeo.ecm.core.storage.sql.net
Class BinaryManagerClient

java.lang.Object
  extended by org.nuxeo.ecm.core.storage.sql.net.BinaryManagerClient
All Implemented Interfaces:
BinaryManager

public class BinaryManagerClient
extends java.lang.Object
implements BinaryManager

A Binary Manager that uses a local BinaryManager as a cache but also passes calls to a remote BinaryManagerServlet for writes and cache misses.


Constructor Summary
BinaryManagerClient(BinaryManager binaryManager, HttpClient httpClient)
           
 
Method Summary
 Binary getBinary(java.io.InputStream in)
          Saves the given input stream into a Binary.
 Binary getBinary(java.lang.String digest)
          Returns a Binary corresponding to the given digest.
 void initialize(RepositoryDescriptor repositoryDescriptor)
          Initializer.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BinaryManagerClient

public BinaryManagerClient(BinaryManager binaryManager,
                           HttpClient httpClient)
Method Detail

initialize

public void initialize(RepositoryDescriptor repositoryDescriptor)
                throws java.io.IOException
Description copied from interface: BinaryManager
Initializer.

Specified by:
initialize in interface BinaryManager
Throws:
java.io.IOException

getBinary

public Binary getBinary(java.io.InputStream in)
                 throws java.io.IOException
Description copied from interface: BinaryManager
Saves the given input stream into a Binary.

Returns a Binary representing the stream. The Binary includes a digest that is a sufficient representation to persist it.

Specified by:
getBinary in interface BinaryManager
Parameters:
in - the input stream
Returns:
the corresponding binary
Throws:
java.io.IOException

getBinary

public Binary getBinary(java.lang.String digest)
Description copied from interface: BinaryManager
Returns a Binary corresponding to the given digest.

A null is returned if the digest could not be found.

Specified by:
getBinary in interface BinaryManager
Parameters:
digest - the digest, or null
Returns:
the corresponding binary

Nuxeo Enterprise Platform 5.4

Copyright © 2010 Nuxeo SAS. All Rights Reserved.