Example usage for javax.xml.ws Endpoint getImplementor

List of usage examples for javax.xml.ws Endpoint getImplementor

Introduction

In this page you can find the example usage for javax.xml.ws Endpoint getImplementor.

Prototype

public abstract Object getImplementor();

Source Link

Document

Returns the implementation object for this endpoint.

Usage

From source file:com.clustercontrol.plugin.impl.WebServicePlugin.java

@Override
public void deactivate() {
    /**/*from w w  w . j  ava2s  .co  m*/
     * web??
     */
    // ?????
    _threadPool.shutdown();
    try {
        long _shutdownTimeout = HinemosPropertyUtil.getHinemosPropertyNum("ws.client.shutdown.timeout",
                Long.valueOf(10000));

        if (!_threadPool.awaitTermination(_shutdownTimeout, TimeUnit.MILLISECONDS)) {
            List<Runnable> remained = _threadPool.shutdownNow();
            if (remained != null) {
                log.info("shutdown timeout. runnable remained. (size = " + remained.size() + ")");
            }
        }
    } catch (InterruptedException e) {
        _threadPool.shutdownNow();
    }

    for (Endpoint endpoint : endpointList) {
        log.info("endpoint stop : " + endpoint.getImplementor().getClass().getSimpleName());
        try {
            /**
             * JAX-WS?????0.0.0.0?listen???web?
             * stop?NullPointerException???stop???????
             * http://java.net/jira/browse/JAX_WS-941
             *
             * ?????JBoss?web?????
             * jboss.log?????
             */
            endpoint.stop();
        } catch (NullPointerException e) {
            log.info("stop endpoint :  " + e.getMessage());
        } catch (Exception e) {
            log.warn("stop endpoint : " + e.getMessage(), e);
        }
    }
}