Package com.boomi.connector.testutil
Class SimpleAtomContext
- java.lang.Object
-
- com.boomi.connector.testutil.SimpleAtomContext
-
- All Implemented Interfaces:
AtomContext
- Direct Known Subclasses:
ConnectorTestContext,SimpleBrowseContext
public class SimpleAtomContext extends Object implements AtomContext
-
-
Constructor Summary
Constructors Constructor Description SimpleAtomContext(AtomConfig config)Constructs a new SimpleAtomContext
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static SSLContextcreateSSLContext(PublicKeyStore publicKeyStore, PrivateKeyStore privateKeyStore)OutputStreamcreateTempOutputStream()Returns an OutputStream which can be used for writing intermediate data in a "safe" manner (i.e.AtomConfiggetConfig()Returns the current Atom's configuration.InputStreamtempOutputStreamToInputStream(OutputStream tempOutputStream)Converts the OutputStream to an InputStream for reading any temporary data written.PayloadtempOutputStreamToPayload(OutputStream tempOutputStream)Converts the OutputStream to an Payload for passing any temporary data written to anOperationResponsemethod.
-
-
-
Constructor Detail
-
SimpleAtomContext
public SimpleAtomContext(AtomConfig config)
Constructs a new SimpleAtomContext- Parameters:
config- the basic config for browsing
-
-
Method Detail
-
createSSLContext
protected static SSLContext createSSLContext(PublicKeyStore publicKeyStore, PrivateKeyStore privateKeyStore) throws GeneralSecurityException
- Throws:
GeneralSecurityException
-
getConfig
public AtomConfig getConfig()
Description copied from interface:AtomContextReturns the current Atom's configuration.- Specified by:
getConfigin interfaceAtomContext
-
createTempOutputStream
public OutputStream createTempOutputStream() throws IOException
Description copied from interface:AtomContextReturns an OutputStream which can be used for writing intermediate data in a "safe" manner (i.e. the intermediate storage will not use an unbounded amount of memory). The temporary data may be read by calling either theAtomContext.tempOutputStreamToInputStream(java.io.OutputStream)orAtomContext.tempOutputStreamToPayload(java.io.OutputStream)methods on the returned OutputStream before closing. The returned OutputStream must be closed after use.- Specified by:
createTempOutputStreamin interfaceAtomContext- Throws:
IOException
-
tempOutputStreamToInputStream
public InputStream tempOutputStreamToInputStream(OutputStream tempOutputStream) throws IOException
Description copied from interface:AtomContextConverts the OutputStream to an InputStream for reading any temporary data written. This method must be called before the temporary OutputStream is closed. The returned InputStream must be closed after use. Prefer theAtomContext.tempOutputStreamToPayload(java.io.OutputStream)method for passing the data to anOperationResponsemethod.- Specified by:
tempOutputStreamToInputStreamin interfaceAtomContext- Parameters:
tempOutputStream- OutputStream created from a call toAtomContext.createTempOutputStream()- Throws:
IOException
-
tempOutputStreamToPayload
public Payload tempOutputStreamToPayload(OutputStream tempOutputStream) throws IOException
Description copied from interface:AtomContextConverts the OutputStream to an Payload for passing any temporary data written to anOperationResponsemethod. This method must be called before the temporary OutputStream is closed.- Specified by:
tempOutputStreamToPayloadin interfaceAtomContext- Parameters:
tempOutputStream- OutputStream created from a call toAtomContext.createTempOutputStream()- Throws:
IOException
-
-