org.rhq.core.domain.util.serial
Class ExternalizableStrategy

java.lang.Object
  extended by org.rhq.core.domain.util.serial.ExternalizableStrategy

public class ExternalizableStrategy
extends Object

This uses a ThreadLocal to bind an externalization strategy based on the invoking subsystem. In other words, when we know we're serializing for Server-Agent communication then set to AGENT, when we know we're serializing for RemoteClient-Server communication set to REMOTEAPI. By keeping this info on the thread we avoid having to tag all of the relevant objects that will be serialized.


Nested Class Summary
static class ExternalizableStrategy.Subsystem
           
 
Constructor Summary
ExternalizableStrategy()
           
 
Method Summary
static ExternalizableStrategy.Subsystem getStrategy()
           
static void setStrategy(ExternalizableStrategy.Subsystem newStrategy)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExternalizableStrategy

public ExternalizableStrategy()
Method Detail

getStrategy

public static ExternalizableStrategy.Subsystem getStrategy()

setStrategy

public static void setStrategy(ExternalizableStrategy.Subsystem newStrategy)


Copyright © 2008-2009 RHQ Project Advisory Board (Red Hat, Inc.). All Rights Reserved.