Spring Integration

org.springframework.integration.util
Class UUIDConverter

java.lang.Object
  extended by org.springframework.integration.util.UUIDConverter
All Implemented Interfaces:
org.springframework.core.convert.converter.Converter<java.lang.Object,java.util.UUID>

public class UUIDConverter
extends java.lang.Object
implements org.springframework.core.convert.converter.Converter<java.lang.Object,java.util.UUID>

Utility to help generate UUID instances from generic objects.

Author:
Dave Syer

Field Summary
static java.lang.String DEFAULT_CHARSET
           
 
Constructor Summary
UUIDConverter()
           
 
Method Summary
 java.util.UUID convert(java.lang.Object source)
          Convert the input to a UUID using the convenience method getUUID(Object).
static java.util.UUID getUUID(java.lang.Object input)
          Convenient utility to convert an object to a UUID.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_CHARSET

public static final java.lang.String DEFAULT_CHARSET
See Also:
Constant Field Values
Constructor Detail

UUIDConverter

public UUIDConverter()
Method Detail

convert

public java.util.UUID convert(java.lang.Object source)
Convert the input to a UUID using the convenience method getUUID(Object).

Specified by:
convert in interface org.springframework.core.convert.converter.Converter<java.lang.Object,java.util.UUID>
See Also:
Converter.convert(java.lang.Object)

getUUID

public static java.util.UUID getUUID(java.lang.Object input)
Convenient utility to convert an object to a UUID. If the input is If none of the above applies there will be an exception trying to serialize.

Parameters:
input - an Object
Returns:
a UUID constructed from the input

Spring Integration