Package com.boomi.connector.api
Interface AtomContext
-
- All Known Subinterfaces:
BrowseContext,ConnectorContext,OperationContext
- All Known Implementing Classes:
ConnectorTestContext,SimpleAtomContext,SimpleBrowseContext,SimpleOperationContext
public interface AtomContextBasic contextual information about the atom in which the connector is executing.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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.
-
-
-
Method Detail
-
getConfig
AtomConfig getConfig()
Returns the current Atom's configuration.
-
createTempOutputStream
OutputStream createTempOutputStream() throws IOException
Returns 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 thetempOutputStreamToInputStream(java.io.OutputStream)ortempOutputStreamToPayload(java.io.OutputStream)methods on the returned OutputStream before closing. The returned OutputStream must be closed after use.- Throws:
IOException
-
tempOutputStreamToInputStream
InputStream tempOutputStreamToInputStream(OutputStream tempOutputStream) throws IOException
Converts 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 thetempOutputStreamToPayload(java.io.OutputStream)method for passing the data to anOperationResponsemethod.- Parameters:
tempOutputStream- OutputStream created from a call tocreateTempOutputStream()- Throws:
IOException
-
tempOutputStreamToPayload
Payload tempOutputStreamToPayload(OutputStream tempOutputStream) throws IOException
Converts the OutputStream to an Payload for passing any temporary data written to anOperationResponsemethod. This method must be called before the temporary OutputStream is closed.- Parameters:
tempOutputStream- OutputStream created from a call tocreateTempOutputStream()- Throws:
IOException
-
-