Check the existence of {@code org.eclipse.jetty.websocket} as dependency
and add {@link ro.pippo.jetty.websocket.JettyWebSocketFilter} instead of {@link PippoFilter}.

@return
497635
@Override
    protected PippoFilter createPippoFilter() {
        try {
            // try to load a class from jetty.websocket
            Class.forName("org.eclipse.jetty.websocket.api.WebSocketListener");
        } catch (ClassNotFoundException e) {
            return super.createPippoFilter();
        }

        try {
            // create an instance of JettyWebSocketFilter
            Class<?> pippoFilterClass = Class.forName("ro.pippo.jetty.websocket.JettyWebSocketFilter");
            return (PippoFilter) pippoFilterClass.newInstance();
        } catch (ClassNotFoundException | IllegalAccessException | InstantiationException e) {
            throw new PippoRuntimeException(e);
        }
    }
550958
@Override
    public final RESOLVESTAGETYPE addDependency(final MavenDependency dependency) throws IllegalArgumentException {
        if (dependency == null) {
            throw new IllegalArgumentException("dependency must be specified");
        }
        final MavenDependency resolved = this.resolveDependency(dependency);
        this.session.getDependenciesForResolution().add(resolved);
        return this.covarientReturn();
    }
1251030
private SSLSocketFactory getSSLSocketFactory() throws Exception {
        SSLSocketFactory sslSF = null;
        Object sslConfig = this.sslConfig.getService();
        if(sslConfig != null) {
            // Reflectively invoke this operation to a helper class because the classes needed to perform
            // this operation are dynamically imported, depending on if the ssl-1.0 feature is enabled.
            Class<?> SSLHelper = Class.forName("com.ibm.ws.cloudant.internal.SSLHelper");
            sslSF = (SSLSocketFactory) SSLHelper.getMethod("getSSLSocketFactory", Object.class).invoke(null, sslConfig);
        }
        return sslSF;
    }
615270
public SmtpConnectionFactory build() {
    if (session == null) {
      session = Session.getInstance(new Properties());
    }

    TransportStrategy transportStrategy = protocol == null ? newSessiontStrategy() : newProtocolStrategy(protocol);

    ConnectionStrategy connectionStrategy;
    if (host == null && port == -1 && username == null && password == null) {
      connectionStrategy = newConnectionStrategy();
    } else {
      connectionStrategy = newConnectionStrategy(host, port, username, password);
    }

    return new SmtpConnectionFactory(session, transportStrategy, connectionStrategy, defaultTransportListeners);
  }
194650
protected boolean isDependentOn(GrailsPlugin plugin, String pluginName) {

        // check if toCompare depends on the current plugin
        String[] dependencyNames = plugin.getDependencyNames();
        for (int i = 0; i < dependencyNames.length; i++) {

            final String dependencyName = dependencyNames[i];
            if (pluginName.equals(dependencyName)) {

                return true;

                // we've establish that p does depend on plugin, so we can
                // break from this loop
            }
        }
        return false;
    }
1000941
private ServerConnector configureConnector() {
        ServerConnector connector = null;
        if (m_tls) {
            connector = createSSLConnector();
        } else {
            // Unsecured connector
            connector = new ServerConnector(m_jettyServer);
        }
        if (m_restaddr != null) {
            connector.setHost(m_restaddr);
        }
        connector.setPort(m_restport);
        connector.setIdleTimeout(SOCKET_TIMEOUT_MILLIS);
        connector.addBean(new ConnListener());  // invokes registered callbacks, if any
        return connector;
    }
42100
public static LazyProxyFactory createDefaultProxyFactory() {
        if (testDependencyFullFilled()) {
            final String factoryClassName = "dev.morphia.mapping.lazy.CGLibLazyProxyFactory";
            try {
                return (LazyProxyFactory) Class.forName(factoryClassName).newInstance();
            } catch (Exception e) {
                LOG.error("While instantiating " + factoryClassName, e);
            }
        }
        return null;
    }
913413
@Bean
	public TomcatServletWebServerFactory servletWebServerFactory() {
		return new TomcatServletWebServerFactory() {

			@Override
			protected void prepareContext(Host host,
					ServletContextInitializer[] initializers) {
				super.prepareContext(host, initializers);
				StandardContext child = new StandardContext();
				child.addLifecycleListener(new Tomcat.FixContextListener());
				child.setPath("/cloudfoundryapplication");
				ServletContainerInitializer initializer = getServletContextInitializer(
						getContextPath());
				child.addServletContainerInitializer(initializer, Collections.emptySet());
				child.setCrossContext(true);
				host.addChild(child);
			}

		};
	}
901578
public FilterType<WebFragmentType<T>> getOrCreateFilter()
   {
      List<Node> nodeList = childNode.get("filter");
      if (nodeList != null &&  nodeList.size() > 0)
      {
         return new FilterTypeImpl<WebFragmentType<T>>(this, "filter", childNode, nodeList.get(0));
      }
      return createFilter();
   }
1238010
@SuppressWarnings("unchecked")
  public static SocketHandlerFunction getSocketHandler() {
    try {
      //forcing use of JNA to ensure AOT compilation
      Platform.getOSType();

      return (urlParser, host) -> {
        if (urlParser.getOptions().pipe != null) {
          return new NamedPipeSocket(host, urlParser.getOptions().pipe);
        } else if (urlParser.getOptions().localSocket != null) {
          try {
            return new UnixDomainSocket(urlParser.getOptions().localSocket);
          } catch (RuntimeException re) {
            throw new IOException(re.getMessage(), re.getCause());
          }
        } else if (urlParser.getOptions().sharedMemory != null) {
          try {
            return new SharedMemorySocket(urlParser.getOptions().sharedMemory);
          } catch (RuntimeException re) {
            throw new IOException(re.getMessage(), re.getCause());
          }
        } else {
          return Utils.standardSocket(urlParser, host);
        }

      };
    } catch (Throwable cle) {
      //jna jar's are not in classpath
    }
    return (urlParser, host) -> Utils.standardSocket(urlParser, host);
  }
579749
public Blade webSocket(@NonNull String path, @NonNull WebSocketHandler handler) {
        this.routeMatcher.addWebSocket(path,handler);
        return this;
    }
710160
public static javax.net.SocketFactory getDefault() {
        if (tc.isEntryEnabled())
            Tr.entry(tc, "getDefault");

        if (thisClass == null) {
            try {
                thisClass = new com.ibm.ws.ssl.protocol.LibertySSLSocketFactory();
            } catch (Exception e) {
                if (tc.isDebugEnabled())
                    Tr.debug(tc, "SSLSocketFactory exception getting default socket factory.", new Object[] { e });
                FFDCFilter.processException(e, "SSLSocketFactory", "getDefault", thisClass);
            }
        }

        if (tc.isEntryEnabled())
            Tr.exit(tc, "getDefault");
        return thisClass;
    }
999511
public OperationFuture<List<Server>> addSecondaryNetwork(ServerFilter filter, AddNetworkConfig config) {
        return addSecondaryNetwork(Arrays.asList(getRefsFromFilter(filter)), config);
    }
1215403
public static WebSocketExtensionFactory newInstance(ClassLoader cl) {
        ServiceLoader<WebSocketExtensionFactorySpi> services = load(WebSocketExtensionFactorySpi.class, cl);
        return newInstance(services);
    }
1286772
public static AnnotatedJacksonModule with(Class<? extends Annotation> clientBindingAnnotation) {
    if (clientBindingAnnotation == null) {
      throw new NullPointerException("clientBindingAnnotation:null");
    }

    BindingAnnotations.checkIsBindingAnnotation(clientBindingAnnotation);

    return new AnnotatedJacksonModule(clientBindingAnnotation);
  }
206040
@Override
	public WebsocketSender uri(String uri) {
		return new WebsocketFinalizer(cachedConfiguration.bootstrap(b -> HttpClientConfiguration.uri(b, uri)));
	}
344858
public FilterMappingType<WebAppType<T>> getOrCreateFilterMapping()
   {
      List<Node> nodeList = childNode.get("filter-mapping");
      if (nodeList != null &&  nodeList.size() > 0)
      {
         return new FilterMappingTypeImpl<WebAppType<T>>(this, "filter-mapping", childNode, nodeList.get(0));
      }
      return createFilterMapping();
   }