Package com.boomi.connector.api
Interface AtomContext
-
- All Known Subinterfaces:
BrowseContext
,ConnectorContext
,OperationContext
- All Known Implementing Classes:
ConnectorTestContext
,SimpleAtomContext
,SimpleBrowseContext
,SimpleOperationContext
public interface AtomContext
Basic contextual information about the atom in which the connector is executing.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description OutputStream
createTempOutputStream()
Returns an OutputStream which can be used for writing intermediate data in a "safe" manner (i.e.AtomConfig
getConfig()
Returns the current Atom's configuration.InputStream
tempOutputStreamToInputStream(OutputStream tempOutputStream)
Converts the OutputStream to an InputStream for reading any temporary data written.Payload
tempOutputStreamToPayload(OutputStream tempOutputStream)
Converts the OutputStream to an Payload for passing any temporary data written to anOperationResponse
method.
-
-
-
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 anOperationResponse
method.- 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 anOperationResponse
method. This method must be called before the temporary OutputStream is closed.- Parameters:
tempOutputStream
- OutputStream created from a call tocreateTempOutputStream()
- Throws:
IOException
-
-