|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.io.OutputStream
org.openadaptor.util.PipelineOutputStream
org.openadaptor.security.AbstractSecurityOutputStreamComponent
public abstract class AbstractSecurityOutputStreamComponent
This is an abstract implementation of the SecurityOutputStreamComponent. It holds a reference to the security manager of the adaptor. Holds the reference to the policy being applied currently.
EncryptionOutputStreamComponent,
SignOutputStreamComponent,
DigestOutputStreamComponent,
SecurityOutputStreamComponent,
PipelineOutputStream| Field Summary | |
|---|---|
protected SecurityAgent |
_agent
|
| Fields inherited from class org.openadaptor.util.PipelineOutputStream |
|---|
_inDataBlock, _out |
| Fields inherited from interface org.openadaptor.security.interfaces.SecurityComponent |
|---|
ALGORITHM_HD_ATTR, CIPHER_DECRYPT_OPERATION, CIPHER_ENCRYPT_OPERATION, DEFAULT_CIPHER_ALGO, DEFAULT_CIPHER_PROVIDER, DEFAULT_DIGEST_ALGO, DEFAULT_DIGEST_PROVIDER, DEFAULT_KEY_EXPIRY, DEFAULT_SIGN_ALGO, DEFAULT_SIGN_PROVIDER, DIGEST_FT_ATTR, DIGEST_SECURITY_OPERATION, KEYID_HD_ATTR, PARAMS_DATA_HD_ATTR, PARAMS_TYPE_HD_ATTR, PROVIDER_HD_ATTR, SIGN_FT_ATTR, SIGN_SECURITY_OPERATION |
| Constructor Summary | |
|---|---|
AbstractSecurityOutputStreamComponent(OutputStreamComponent output)
Default constructor for a pipeline. |
|
| Method Summary | |
|---|---|
void |
finishDataBlock()
Finish off the current data block being output. |
Policy |
getPolicy()
Returns the Policy object being used by the Security Agent - SecurityOutputStream |
OASecurityManager |
getSecurityManager()
Returns the SecurityManager object attached to the SecurityOutputStream |
void |
processWrite(byte[] b)
|
abstract void |
processWrite(byte[] b,
int off,
int len)
True write method. |
protected abstract void |
processWrite(int b)
True write method. |
void |
setSecurity(Policy policy,
OASecurityManager securityManager)
Initializes the SecurityAgent - SecurityOutputStreamComponent. |
protected void |
setSecurityOperation(java.lang.String operation)
|
protected void |
setUnsetParameters(java.lang.String algoName,
java.lang.String providerName)
|
void |
startDataBlock()
Start a new data block. |
void |
write(byte[] b)
Writes bb.length bytes from the specified byte array
to the output stream. |
void |
write(byte[] b,
int off,
int len)
Writes len bytes from the specified byte array
starting at offset off to this output stream. |
void |
write(int b)
Writes the Byte[] into the Output Stream - Using Cipher Output Stream |
| Methods inherited from class org.openadaptor.util.PipelineOutputStream |
|---|
asOutputStream, close, flush, getOutputStream, isInDataBlock, setOutputStream |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.openadaptor.util.OutputStreamComponent |
|---|
asOutputStream, close, flush, getOutputStream, isInDataBlock, setOutputStream |
| Field Detail |
|---|
protected SecurityAgent _agent
| Constructor Detail |
|---|
public AbstractSecurityOutputStreamComponent(OutputStreamComponent output)
output - The next component in the pipeline.| Method Detail |
|---|
protected void setSecurityOperation(java.lang.String operation)
public void setSecurity(Policy policy,
OASecurityManager securityManager)
throws java.lang.SecurityException
setSecurity in interface SecurityComponentpolicy - is used to get various properties like algorithm,
provider, etc. required for actual low-level operation.securityManager - used to interact with SecurityServer to get
various information like key, policy, etc. if required.
java.lang.SecurityException - If there is a problem with the policy
or SecurityManager provided.Policy,
OASecurityManager
protected void setUnsetParameters(java.lang.String algoName,
java.lang.String providerName)
public Policy getPolicy()
getPolicy in interface SecurityComponentpublic OASecurityManager getSecurityManager()
getSecurityManager in interface SecurityComponentOASecurityManager
public void startDataBlock()
throws java.io.IOException
startDataBlock in interface OutputStreamComponentstartDataBlock in class PipelineOutputStreamjava.io.IOException - If _out or _agent are not usable.
public void finishDataBlock()
throws java.io.IOException
finishDataBlock in interface OutputStreamComponentfinishDataBlock in class PipelineOutputStreamjava.io.IOException - If _out is null.
protected abstract void processWrite(int b)
throws java.io.IOException
java.io.IOException
public final void write(int b)
throws java.io.IOException
write in interface OutputStreamComponentwrite in class java.io.OutputStreamb - the byte.
java.io.IOException - if an I/O error occurs.
public abstract void processWrite(byte[] b,
int off,
int len)
throws java.io.IOException
java.io.IOException
public final void write(byte[] b,
int off,
int len)
throws java.io.IOException
OutputStreamComponentlen bytes from the specified byte array
starting at offset off to this output stream.
write in interface OutputStreamComponentwrite in class java.io.OutputStreamoff - the start offset in the data.len - the number of bytes to write.
java.io.IOException - if an I/O error occurs.
public void processWrite(byte[] b)
throws java.io.IOException
java.io.IOException
public final void write(byte[] b)
throws java.io.IOException
OutputStreamComponentbb.length bytes from the specified byte array
to the output stream.
write in interface OutputStreamComponentwrite in class java.io.OutputStreamb - the bytes.
java.io.IOException - if an I/O error occurs.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||