public class DefaultReferenceableDelegate extends Object implements SolReferenceableDelegate, ObjectFactory, DirObjectFactory
SolJmsUtility.setReferenceableDelegate(SolReferenceableDelegate).
This class does double duty in that it is the Object factory as well.
Property values that start with ‘#’ store ok but looking them up will throw a java.io.StreamCorruptedException. Properties are stored as property name – property value pairs (all as strings). The algorithm to get around the leading ‘#’ problem is this: If the property value has a leading ‘#’, append an ‘_’ to the property name and prepend an ‘_’ to the property value. So you could have (ClientDescription_=_#MyDescription). When the property values are looked up, if there exists an entry with a property name with an underscore on the end, I remove the first character from the property value.
| Modifier and Type | Field and Description |
|---|---|
static DefaultReferenceableDelegate |
onlyInstance |
static String |
QueueRefAddrType |
static String |
TopicRefAddrType |
| Constructor and Description |
|---|
DefaultReferenceableDelegate() |
| Modifier and Type | Method and Description |
|---|---|
Object |
getObjectInstance(Object arg0,
Name arg1,
Context arg2,
Hashtable<?,?> arg3) |
Object |
getObjectInstance(Object obj,
Name name,
Context ctx,
Hashtable<?,?> table,
Attributes attrs) |
Reference |
getReference(Referenceable referenceable)
The ConnectionFactory, XAConnection, Topic, or Queue is given as the referenceable
argument and can be cast to a
SolConnectionFactory, SolXAConnectionFactory, SolTopic, or SolQueue. |
public static final DefaultReferenceableDelegate onlyInstance
public static final String TopicRefAddrType
public static final String QueueRefAddrType
public Object getObjectInstance(Object obj, Name name, Context ctx, Hashtable<?,?> table, Attributes attrs) throws Exception
getObjectInstance in interface DirObjectFactoryExceptionpublic Object getObjectInstance(Object arg0, Name arg1, Context arg2, Hashtable<?,?> arg3) throws Exception
getObjectInstance in interface ObjectFactoryExceptionpublic Reference getReference(Referenceable referenceable) throws NamingException
SolReferenceableDelegateSolConnectionFactory, SolXAConnectionFactory, SolTopic, or SolQueue.
If calling this returns null, the default implementation will be called.getReference in interface SolReferenceableDelegatereferenceable - The SolConnectionFactory, SolXAConnectionFactory, SolTopic, or SolQueue that Referenceable.getReference() was called onNamingException - on errorCopyright 2004-2019 Solace Corporation. All rights reserved.