Spring Web Services Framework

org.springframework.ws.soap.addressing.messageid
Class RandomGuidMessageIdStrategy

java.lang.Object
  extended by org.springframework.ws.soap.addressing.messageid.RandomGuidMessageIdStrategy
All Implemented Interfaces:
MessageIdStrategy

public class RandomGuidMessageIdStrategy
extends Object
implements MessageIdStrategy

Implementation of the MessageIdStrategy interface that uses a RandomGuid to generate a Message Id. The GUID is prefixed by urn:guid:.

Since:
1.5.0
Author:
Arjen Poutsma

Field Summary
static String PREFIX
           
 
Constructor Summary
RandomGuidMessageIdStrategy()
           
 
Method Summary
 boolean isDuplicate(URI messageId)
          Returns false.
 URI newMessageId(SoapMessage message)
          Returns a new WS-Addressing MessageID for the given SoapMessage.
 void setSecure(boolean secure)
          Sets whether or not the generated random numbers should be secure.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PREFIX

public static final String PREFIX
See Also:
Constant Field Values
Constructor Detail

RandomGuidMessageIdStrategy

public RandomGuidMessageIdStrategy()
Method Detail

setSecure

public void setSecure(boolean secure)
Sets whether or not the generated random numbers should be secure. If set to true, generated GUIDs are cryptographically strong.


isDuplicate

public boolean isDuplicate(URI messageId)
Returns false.

Specified by:
isDuplicate in interface MessageIdStrategy
Parameters:
messageId - the message id
Returns:
true if a duplicate; false otherwise

newMessageId

public URI newMessageId(SoapMessage message)
Description copied from interface: MessageIdStrategy
Returns a new WS-Addressing MessageID for the given SoapMessage.

Specified by:
newMessageId in interface MessageIdStrategy
Parameters:
message - the message to create an id for
Returns:
the new message id

Spring Web Services Framework

Copyright © 2005-2010 The Spring Web Services Framework. All Rights Reserved.