Package net.messagevortex.router
Class SimpleMessageFactory
java.lang.Object
net.messagevortex.router.MessageFactory
net.messagevortex.router.SimpleMessageFactory
-
Field Summary
Fields inherited from class net.messagevortex.router.MessageFactory
fullmsg, hotspot, identityStore, msg, source, target -
Constructor Summary
ConstructorsConstructorDescriptionSimpleMessageFactory(String msg, int source, int target, IdentityStoreBlock[] anonGroupMembers, IdentityStore is) A simple message factory creating a possibly redundant message path. -
Method Summary
Modifier and TypeMethodDescriptionbuild()build a simple message path.static MessageFactorybuildMessage(String msg, int source, int target, IdentityStoreBlock[] anonGroupMembers, IdentityStore is) Build a message with the specified parameters.getGraph()Gets the previously built message path.longgetMinMessageTransferStart(long newmin) Sets the minimum time required to process a message in a node.static voidThis is a test methode sheduled to be removed.longsetMaxTransferTime(long newmax) Sets the maximum time allowed to transfer the message to the final destination.longsetMinStepProcessSTime(long newmin) Sets the minimum time required to process a message in a node.Methods inherited from class net.messagevortex.router.MessageFactory
getMessage, setIdentityStore
-
Constructor Details
-
SimpleMessageFactory
public SimpleMessageFactory(String msg, int source, int target, IdentityStoreBlock[] anonGroupMembers, IdentityStore is) A simple message factory creating a possibly redundant message path.
- Parameters:
msg- the message to be usedsource- the source address for the pathtarget- the target address for the pathanonGroupMembers- the anonymity set to be usedis- the identity store providing the necessary keys and identities
-
-
Method Details
-
buildMessage
public static MessageFactory buildMessage(String msg, int source, int target, IdentityStoreBlock[] anonGroupMembers, IdentityStore is) Build a message with the specified parameters.
- Parameters:
msg- the message to be embeddedsource- the indes of the source identitytarget- the index of the target identityanonGroupMembers- a set of all available targets in the group setis- the identity store to be used- Returns:
- the built message wrapped in a message factory
-
build
build a simple message path.
- Specified by:
buildin classMessageFactory
-
setMaxTransferTime
public long setMaxTransferTime(long newmax) Sets the maximum time allowed to transfer the message to the final destination.
- Parameters:
newmax- the new maximum transfer time in seconds- Returns:
- the previously set transfer time
-
setMinStepProcessSTime
public long setMinStepProcessSTime(long newmin) Sets the minimum time required to process a message in a node.
This time includes anti-malware related processing or anti-UBE related actions.
- Parameters:
newmin- the new time in seconds to be set- Returns:
- the previously set time
-
getMinMessageTransferStart
public long getMinMessageTransferStart(long newmin) Sets the minimum time required to process a message in a node.
This time includes anti-malware related processing or anti-UBE related actions.
- Parameters:
newmin- the new time in seconds to be set- Returns:
- the previously set time
-
getGraph
Gets the previously built message path.
- Specified by:
getGraphin classMessageFactory- Returns:
- the message path or null if the previous build has failed
-
main
This is a test methode sheduled to be removed.
- Parameters:
args- ordinary main args (ignored)- Throws:
IOException- if the function was unable to load the identity store from filesystem
-