ResourceRefpublic class ResourceRef extends Reference Represents a reference address to a resource. |
Fields Summary |
---|
public static final String | DEFAULT_FACTORYDefault factory for this reference. | public static final String | DESCRIPTIONDescription address type. | public static final String | SCOPEScope address type. | public static final String | AUTHAuth address type. |
Constructors Summary |
---|
public ResourceRef(String resourceClass, String description, String scope, String auth)Resource Reference.
// ----------------------------------------------------------- Constructors
this(resourceClass, description, scope, auth, null, null);
| public ResourceRef(String resourceClass, String description, String scope, String auth, String factory, String factoryLocation)Resource Reference.
super(resourceClass, factory, factoryLocation);
StringRefAddr refAddr = null;
if (description != null) {
refAddr = new StringRefAddr(DESCRIPTION, description);
add(refAddr);
}
if (scope != null) {
refAddr = new StringRefAddr(SCOPE, scope);
add(refAddr);
}
if (auth != null) {
refAddr = new StringRefAddr(AUTH, auth);
add(refAddr);
}
|
Methods Summary |
---|
public java.lang.String | getFactoryClassName()Retrieves the class name of the factory of the object to which this
reference refers.
String factory = super.getFactoryClassName();
if (factory != null) {
return factory;
} else {
factory = System.getProperty(Context.OBJECT_FACTORIES);
if (factory != null) {
return null;
} else {
return DEFAULT_FACTORY;
}
}
| public java.lang.String | toString()Return a String rendering of this object.
StringBuffer sb = new StringBuffer("ResourceRef[");
sb.append("className=");
sb.append(getClassName());
sb.append(",factoryClassLocation=");
sb.append(getFactoryClassLocation());
sb.append(",factoryClassName=");
sb.append(getFactoryClassName());
Enumeration refAddrs = getAll();
while (refAddrs.hasMoreElements()) {
RefAddr refAddr = (RefAddr) refAddrs.nextElement();
sb.append(",{type=");
sb.append(refAddr.getType());
sb.append(",content=");
sb.append(refAddr.getContent());
sb.append("}");
}
sb.append("]");
return (sb.toString());
|
|