org.mule.tck.security
Class MockEncryptionStrategy

java.lang.Object
  extended by org.mule.tck.security.Named
      extended by org.mule.tck.security.MockEncryptionStrategy
All Implemented Interfaces:
EncryptionStrategy, Initialisable, NamedObject

public class MockEncryptionStrategy
extends Named
implements EncryptionStrategy

Empty mock for tests


Field Summary
 
Fields inherited from interface org.mule.api.lifecycle.Initialisable
PHASE_NAME
 
Constructor Summary
MockEncryptionStrategy()
           
 
Method Summary
 byte[] decrypt(byte[] data, Object info)
           
 InputStream decrypt(InputStream data, Object info)
           
 byte[] encrypt(byte[] data, Object info)
           
 InputStream encrypt(InputStream data, Object info)
           
 void initialise()
          Method used to perform any initialisation work.
 
Methods inherited from class org.mule.tck.security.Named
getName, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.mule.api.NamedObject
getName
 

Constructor Detail

MockEncryptionStrategy

public MockEncryptionStrategy()
Method Detail

encrypt

public byte[] encrypt(byte[] data,
                      Object info)
               throws CryptoFailureException
Specified by:
encrypt in interface EncryptionStrategy
Throws:
CryptoFailureException

decrypt

public byte[] decrypt(byte[] data,
                      Object info)
               throws CryptoFailureException
Specified by:
decrypt in interface EncryptionStrategy
Throws:
CryptoFailureException

initialise

public void initialise()
                throws InitialisationException
Description copied from interface: Initialisable
Method used to perform any initialisation work. If a fatal error occurs during initialisation an InitialisationException should be thrown, causing the Mule instance to shutdown. If the error is recoverable, say by retrying to connect, a RecoverableException should be thrown. There is no guarantee that by throwing a Recoverable exception that the Mule instance will not shut down.

Specified by:
initialise in interface Initialisable
Throws:
InitialisationException - if a fatal error occurs causing the Mule instance to shutdown
RecoverableException - if an error occurs that can be recovered from

decrypt

public InputStream decrypt(InputStream data,
                           Object info)
                    throws CryptoFailureException
Specified by:
decrypt in interface EncryptionStrategy
Throws:
CryptoFailureException

encrypt

public InputStream encrypt(InputStream data,
                           Object info)
                    throws CryptoFailureException
Specified by:
encrypt in interface EncryptionStrategy
Throws:
CryptoFailureException


Copyright © 2003-2014 MuleSoft, Inc.. All Rights Reserved.