public String toString() { getWrappedDefinitionForUse(); String results = ""; if (wsdlDefinition != null) { results = wsdlDefinition.toString(); } doneUsingWrappedDefinition(); return results; }
public void loadResources() { if (wsdlDefinition == null) { wsdlDefinition = restore(); } }
public void releaseResources() { boolean saved = save(); if (saved) { // release the in-memory copy of the WSDL4J wsdlDefinition = null; } }
/** * This is an internal utility to indicate that the * use of WSDL definition has completed. */ private void doneUsingWrappedDefinition() { long assessors = accessCount.decrementAndGet(); if (assessors == 0) { releaseResources(); } }
/** * Constructor * * @param def The WSDL Definition */ public WSDLWrapperSaveImpl(Definition def) { if (log.isDebugEnabled()) { log.debug("WSDLWrapperSaveImpl(Definition def) called"); log.trace(JavaUtils.callStackToString()); } prepare(def, null); }
public Definition getUnwrappedDefinition() { getWrappedDefinitionForUse(); Definition def; if ((wsdlDefinition != null) && (wsdlDefinition instanceof WSDLDefinitionWrapper)) { def = ((WSDLDefinitionWrapper) wsdlDefinition).getUnwrappedDefinition(); } else { def = wsdlDefinition; } return def; }
/** * This is an internal utility to ensure that the * WSDL definition being wrapped is available for * use. * <P> * For example, if the WSDL4J WSDL definition object * had been saved, this will reload it. */ private void getWrappedDefinitionForUse() { if (wsdlDefinition == null) { loadResources(); } if (wsdlDefinition != null) { accessCount.incrementAndGet(); } }
wrapperImpl = new WSDLWrapperSaveImpl(def, wURL);
/** * This is an internal utility to indicate that the * use of WSDL definition has completed. */ private void doneUsingWrappedDefinition() { long assessors = accessCount.decrementAndGet(); if (assessors == 0) { releaseResources(); } }
/** * Constructor * * @param def The WSDL Definition */ public WSDLWrapperSaveImpl(Definition def) { if (log.isDebugEnabled()) { log.debug("WSDLWrapperSaveImpl(Definition def) called"); log.trace(JavaUtils.callStackToString()); } prepare(def, null); }
public Definition getUnwrappedDefinition() { getWrappedDefinitionForUse(); Definition def; if ((wsdlDefinition != null) && (wsdlDefinition instanceof WSDLDefinitionWrapper)) { def = ((WSDLDefinitionWrapper) wsdlDefinition).getUnwrappedDefinition(); } else { def = wsdlDefinition; } return def; }
/** * This is an internal utility to ensure that the * WSDL definition being wrapped is available for * use. * <P> * For example, if the WSDL4J WSDL definition object * had been saved, this will reload it. */ private void getWrappedDefinitionForUse() { if (wsdlDefinition == null) { loadResources(); } if (wsdlDefinition != null) { accessCount.incrementAndGet(); } }
wrapperImpl = new WSDLWrapperSaveImpl(def, wURL);
public String toString() { getWrappedDefinitionForUse(); String results = ""; if (wsdlDefinition != null) { results = wsdlDefinition.toString(); } doneUsingWrappedDefinition(); return results; }
/** * Initialize the wsdl definition wrapper * * @param def The WSDL4J definition * @param wURL The URL where the WSDL is obtained */ private void prepare(Definition def, URL wURL) { if (isDebugEnabled) { log.debug(myClassName + ".prepare()"); } wsdlDefinition = def; wsdlURL = wURL; accessCount = new Counter(); releaseResources(); }
/** * Constructor * * @param def The WSDL Definition * @param wURL The URL for the wsdl */ public WSDLWrapperSaveImpl(Definition def, URL wURL) { if (log.isDebugEnabled()) { log.debug("WSDLWrapperSaveImpl(Definition def, URL wURL) called"); log.trace(JavaUtils.callStackToString()); } prepare(def, wURL); }
public void releaseResources() { boolean saved = save(); if (saved) { // release the in-memory copy of the WSDL4J wsdlDefinition = null; } }
public void loadResources() { if (wsdlDefinition == null) { wsdlDefinition = restore(); } }
public Map getBindings() { if (isDebugEnabled) { log.debug(myClassName + ".getBindings()"); } getWrappedDefinitionForUse(); Map results = null; if (wsdlDefinition != null) { results = wsdlDefinition.getBindings(); } doneUsingWrappedDefinition(); return results; }
/** * Initialize the wsdl definition wrapper * * @param def The WSDL4J definition * @param wURL The URL where the WSDL is obtained */ private void prepare(Definition def, URL wURL) { if (isDebugEnabled) { log.debug(myClassName + ".prepare()"); } wsdlDefinition = def; wsdlURL = wURL; accessCount = new Counter(); releaseResources(); }