public class SimpleAtomContext extends Object implements AtomContext
| Constructor and Description |
|---|
SimpleAtomContext(AtomConfig config)
Constructs a new SimpleAtomContext
|
| Modifier and Type | Method and Description |
|---|---|
protected static SSLContext |
createSSLContext(PublicKeyStore publicKeyStore,
PrivateKeyStore privateKeyStore) |
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 an
OperationResponse
method. |
public SimpleAtomContext(AtomConfig config)
config - the basic config for browsingprotected static SSLContext createSSLContext(PublicKeyStore publicKeyStore, PrivateKeyStore privateKeyStore) throws GeneralSecurityException
GeneralSecurityExceptionpublic AtomConfig getConfig()
AtomContextgetConfig in interface AtomContextpublic OutputStream createTempOutputStream() throws IOException
AtomContextAtomContext.tempOutputStreamToInputStream(java.io.OutputStream) or AtomContext.tempOutputStreamToPayload(java.io.OutputStream) methods on the returned OutputStream
before closing. The returned OutputStream must be closed after use.createTempOutputStream in interface AtomContextIOExceptionpublic InputStream tempOutputStreamToInputStream(OutputStream tempOutputStream) throws IOException
AtomContextAtomContext.tempOutputStreamToPayload(java.io.OutputStream) method for passing the data to an OperationResponse method.tempOutputStreamToInputStream in interface AtomContexttempOutputStream - OutputStream created from a call to AtomContext.createTempOutputStream()IOExceptionpublic Payload tempOutputStreamToPayload(OutputStream tempOutputStream) throws IOException
AtomContextOperationResponse
method. This method must be called before the temporary OutputStream is closed.tempOutputStreamToPayload in interface AtomContexttempOutputStream - OutputStream created from a call to AtomContext.createTempOutputStream()IOException