/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* {@link WSEndpoint} implementation.
*
* @author Kohsuke Kawaguchi
* @author Jitendra Kotamraju
*/
private boolean managedObjectManagerClosed = false;
private Map<QName, WSEndpointReference.EPRExtension> endpointReferenceExtensions = new HashMap<QName, WSEndpointReference.EPRExtension>();
/**
* Set to true once we start shutting down this endpoint.
* Used to avoid running the clean up processing twice.
*
* @see #dispose()
*/
private boolean disposed;
this.serviceName = serviceName;
this.serviceDef = serviceDef;
this.endpointPolicy = endpointPolicy;
this.managedObjectManager =
new MonitorRootService(this).createManagedObjectManager(this);
if (serviceDef != null) {
serviceDef.setOwner(this);
}
this.operationDispatcher = (port == null) ? null : new OperationDispatcher(port, binding, seiModel);
if(c instanceof EndpointAwareCodec) {
// create a copy to avoid sharing the codec between multiple endpoints
c = c.copy();
((EndpointAwareCodec)c).setEndpoint(this);
}
this.masterCodec = c;
terminalTube.setEndpoint(this);
Map<QName, WSEndpointReference.EPRExtension> eprExtensions = new HashMap<QName, WSEndpointReference.EPRExtension>();
try {
//gather EPR extrensions from WSDL Model
}
}
}
EndpointReferenceExtensionContributor[] eprExtnContributors = ServiceFinder.find(EndpointReferenceExtensionContributor.class).toArray();
WSEndpointReference.EPRExtension endpointEprExtn = eprExtnContributor.getEPRExtension(this,wsdlEPRExtn);
if (endpointEprExtn != null) {
}
}
}
} catch (XMLStreamException ex) {
throw new WebServiceException(ex);
}
if(!eprExtensions.isEmpty()) {
}
}
return endpointReferenceExtensions.values();
}
/**
* Nullable when there is no associated WSDL Model
* @return
*/
return operationDispatcher;
}
return endpointPolicy;
}
return implementationClass;
}
return binding;
}
return container;
}
return port;
}
return seiModel;
}
}
public void schedule(final Packet request, final CompletionCallback callback, FiberContextSwitchInterceptor interceptor) {
}
private void processAsync(final Packet request, final CompletionCallback callback, FiberContextSwitchInterceptor interceptor, boolean schedule) {
if (wsdlProperties != null) {
}
if (interceptor != null) {
}
}
}
// let's not reuse tubes as they might be in a wrong state, so not
// calling tubePool.recycle()
// Convert all runtime exceptions to Packet so that transport doesn't
// have to worry about converting to wire message
}
}
};
if (schedule) {
} else {
}
}
public void process(final Packet request, final CompletionCallback callback, FiberContextSwitchInterceptor interceptor) {
}
return new PipeHead() {
public @NotNull Packet process(Packet request, WebServiceContextDelegate wscd, TransportBackChannel tbc) {
if (wsdlProperties != null) {
}
try {
} catch (RuntimeException re) {
// Catch all runtime exceptions so that transport doesn't
// have to worry about converting to wire message
response = request.createServerResponse(faultMsg, request.endpoint.getPort(), null, request.endpoint.getBinding());
}
return response;
}
};
}
public synchronized void dispose() {
if(disposed)
return;
disposed = true;
continue;
}
try {
} catch (Exception e) {
}
break;
}
}
}
return serviceDef;
}
return componentRegistry;
}
if (referenceParameters != null) {
}
}
clazz, String address, String wsdlAddress, List<Element> metadata, List<Element> referenceParameters) {
}
return new WSEndpointReference(
av, address, serviceName, portName, portType, metadata, wsdlAddress, referenceParameters,endpointReferenceExtensions.values(), null).toSpec(clazz);
}
return portName;
}
return masterCodec.copy();
}
return serviceName;
}
return managedObjectManager;
}
// This can be called independently of WSEndpoint.dispose.
// Example: the WSCM framework calls this before dispose.
public void closeManagedObjectManager() {
if (managedObjectManagerClosed == true) {
return;
}
managedObjectManagerClosed = true;
}
return context;
}
}