ServiceRefpublic class ServiceRef extends Reference Represents a reference web service. |
Fields Summary |
---|
public static final String | DEFAULT_FACTORYDefault factory for this reference. | public static final String | SERVICE_INTERFACEService Classname address type. | public static final String | SERVICE_NAMESPACEServiceQname address type. | public static final String | SERVICE_LOCAL_PART | public static final String | WSDLWsdl Location address type. | public static final String | JAXRPCMAPPINGJaxrpcmapping address type. | public static final String | PORTCOMPONENTLINKport-component-ref/port-component-link address type. | public static final String | SERVICEENDPOINTINTERFACEport-component-ref/service-endpoint-interface address type. | private Vector | handlersThe vector to save the handler Reference objects, because they can't be saved in the addrs vector. |
Constructors Summary |
---|
public ServiceRef(String refname, String serviceInterface, String[] serviceQname, String wsdl, String jaxrpcmapping)Service Reference.
// ----------------------------------------------------------- Constructors
this(refname, serviceInterface, serviceQname, wsdl, jaxrpcmapping,
null, null);
| public ServiceRef(String refname, String serviceInterface, String[] serviceQname, String wsdl, String jaxrpcmapping, String factory, String factoryLocation)Service Reference.
super(serviceInterface, factory, factoryLocation);
StringRefAddr refAddr = null;
if (serviceInterface != null) {
refAddr = new StringRefAddr(SERVICE_INTERFACE, serviceInterface);
add(refAddr);
}
if (serviceQname[0] != null) {
refAddr = new StringRefAddr(SERVICE_NAMESPACE, serviceQname[0]);
add(refAddr);
}
if (serviceQname[1] != null) {
refAddr = new StringRefAddr(SERVICE_LOCAL_PART, serviceQname[1]);
add(refAddr);
}
if (wsdl != null) {
refAddr = new StringRefAddr(WSDL, wsdl);
add(refAddr);
}
if (jaxrpcmapping != null) {
refAddr = new StringRefAddr(JAXRPCMAPPING, jaxrpcmapping);
add(refAddr);
}
|
Methods Summary |
---|
public void | addHandler(HandlerRef handler)
handlers.add(handler);
| 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 HandlerRef | getHandler()Add and Get Handlers classes.
return handlers.remove(0);
| public int | getHandlersSize()
return handlers.size();
| public java.lang.String | toString()Return a String rendering of this object.
StringBuffer sb = new StringBuffer("ServiceRef[");
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());
|
|