public class InitialRecipesBlender extends Blender
Constructor and Description |
---|
InitialRecipesBlender(String section)
An initial blender implementation based on anonymity recipes.
|
InitialRecipesBlender(String identity,
BlendingReceiver router,
IdentityStore identityStore,
Accountant acc)
Creates a passthru blender which abstracts a local transport media.
|
Modifier and Type | Method and Description |
---|---|
boolean |
blendMessage(BlendingSpec target,
VortexMessage msg)
This method is called by the router layer to blend a message.
|
byte[] |
blendMessageToBytes(BlendingSpec target,
VortexMessage msg)
Blends a VortexMessage into the apropriate text.
|
String |
getBlendingAddress()
Returns the address supported for blender.
|
boolean |
gotMessage(InputStream is)
This Method is called by the TransportSender layer if a possible vmessage has arrived.
|
int |
setAnonymitySetSize(int newSize)
Sets the size of the anonymity set.
|
VortexMessage |
unblendMessage(byte[] blendedMessage)
Extracts a vortexMessage from a blended message.
|
getTransportSender, getVerifier, setBlenderReceiver, setIncomingMessageListener, setTransportSender, setVerifier
shutdownDaemon, startDaemon, stopDaemon
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
shutdownDaemon, startDaemon, stopDaemon
public InitialRecipesBlender(String section) throws IOException
An initial blender implementation based on anonymity recipes.
section
- the config foile section to be used to configureIOException
- if anything fails :-Dpublic InitialRecipesBlender(String identity, BlendingReceiver router, IdentityStore identityStore, Accountant acc) throws IOException
Creates a passthru blender which abstracts a local transport media.
identity
- the identity (receiver/sender address)router
- the router layer to be usedidentityStore
- the identity store to be used (for decryption of headers)acc
- the accountant to be usedIOException
- if anything fails :-Dpublic int setAnonymitySetSize(int newSize)
Sets the size of the anonymity set.
newSize
- the new size of the set to be usedpublic String getBlendingAddress()
Blender
Returns the address supported for blender.
The address is specified by <transport><address>!<publickey>.
getBlendingAddress
in class Blender
public byte[] blendMessageToBytes(BlendingSpec target, VortexMessage msg)
Blender
Blends a VortexMessage into the apropriate text.
blendMessageToBytes
in class Blender
target
- the blending spec for the recipientmsg
- the message to be blendedpublic VortexMessage unblendMessage(byte[] blendedMessage)
Blender
Extracts a vortexMessage from a blended message.
unblendMessage
in class Blender
blendedMessage
- the blended messagepublic boolean blendMessage(BlendingSpec target, VortexMessage msg)
Blender
This method is called by the router layer to blend a message.
blendMessage
in interface BlendingSender
blendMessage
in class Blender
msg
- the message to be blendedpublic boolean gotMessage(InputStream is)
TransportReceiver
This Method is called by the TransportSender layer if a possible vmessage has arrived.
The message (if any) is decoded, verified and (if successful) passed on to the router layer in a separate thread (@see IncommingMessageRouterListener).
is
- the InputStream containing a possible messageCopyright © 2023. All rights reserved.