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
GeneralSecurityException
public AtomConfig getConfig()
AtomContext
getConfig
in interface AtomContext
public OutputStream createTempOutputStream() throws IOException
AtomContext
AtomContext.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 AtomContext
IOException
public InputStream tempOutputStreamToInputStream(OutputStream tempOutputStream) throws IOException
AtomContext
AtomContext.tempOutputStreamToPayload(java.io.OutputStream)
method for passing the data to an OperationResponse
method.tempOutputStreamToInputStream
in interface AtomContext
tempOutputStream
- OutputStream created from a call to AtomContext.createTempOutputStream()
IOException
public Payload tempOutputStreamToPayload(OutputStream tempOutputStream) throws IOException
AtomContext
OperationResponse
method. This method must be called before the temporary OutputStream is closed.tempOutputStreamToPayload
in interface AtomContext
tempOutputStream
- OutputStream created from a call to AtomContext.createTempOutputStream()
IOException