Examples of Connector


Examples of org.drools.grid.io.Connector

        ConnectorFactoryService cfs = this.grid.get( ConnectorFactoryService.class );
        if ( cfs == null ) {
            throw new RuntimeException( "Unable to resolve ConnectorFactoryService" );
        }
       
        Connector conn = cfs.newConnector();
        IoWriter writer = conn.open( address,
                                     dispathListener,
                                     systemEventListener );
        return new ConversationImpl( conn,
                                     Long.toString( this.conversationIdCounter.incrementAndGet() ),
                                     senderId,
View Full Code Here

Examples of org.eclipse.ecf.server.generic.app.Connector

    final List connectors = scp.load(ins);
    if (connectors != null) {
      serverGroups = new TCPServerSOContainerGroup[connectors.size()];
      int j = 0;
      for (final Iterator i = connectors.iterator(); i.hasNext();) {
        final Connector connect = (Connector) i.next();
        serverGroups[j] = createServerGroup(connect.getHostname(), connect.getPort());
        final List groups = connect.getGroups();
        for (final Iterator g = groups.iterator(); g.hasNext();) {
          final NamedGroup group = (NamedGroup) g.next();
          final TCPServerSOContainer cont = createServerContainer(group.getIDForGroup(), serverGroups[j], group.getName(), connect.getTimeout());
          servers.add(cont);
          ClientPlugin.log("ECF group server created: " + cont.getConfig().getID().getName()); //$NON-NLS-1$
        }
        serverGroups[j].putOnTheAir();
        j++;
View Full Code Here

Examples of org.eclipse.gmf.runtime.notation.Connector

   * @generated
   */
  public Edge createMethodCall_4002(EObject domainElement,
      View containerView, int index, boolean persisted,
      PreferencesHint preferencesHint) {
    Connector edge = NotationFactory.eINSTANCE.createConnector();
    edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
    RelativeBendpoints bendpoints = NotationFactory.eINSTANCE
        .createRelativeBendpoints();
    ArrayList<RelativeBendpoint> points = new ArrayList<RelativeBendpoint>(
        2);
    points.add(new RelativeBendpoint());
    points.add(new RelativeBendpoint());
    bendpoints.setPoints(points);
    edge.setBendpoints(bendpoints);
    ViewUtil.insertChildView(containerView, edge, index, persisted);
    edge.setType(DispelVisualIDRegistry
        .getType(MethodCall2EditPart.VISUAL_ID));
    edge.setElement(domainElement);
    // initializePreferences
    final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint
        .getPreferenceStore();

    org.eclipse.swt.graphics.RGB lineRGB = PreferenceConverter.getColor(
        prefStore, IPreferenceConstants.PREF_LINE_COLOR);
    ViewUtil.setStructuralFeatureValue(edge,
        NotationPackage.eINSTANCE.getLineStyle_LineColor(),
        FigureUtilities.RGBToInteger(lineRGB));
    FontStyle edgeFontStyle = (FontStyle) edge
        .getStyle(NotationPackage.Literals.FONT_STYLE);
    if (edgeFontStyle != null) {
      FontData fontData = PreferenceConverter.getFontData(prefStore,
          IPreferenceConstants.PREF_DEFAULT_FONT);
      edgeFontStyle.setFontName(fontData.getName());
View Full Code Here

Examples of org.eclipse.jetty.server.Connector


    @Test
    public void testSetConnector() throws Exception {
        JettyHTTPServerEngine engine = new JettyHTTPServerEngine();
        Connector conn = new SslSocketConnector();
        engine.setConnector(conn);
        engine.setPort(9000);
        try {
            engine.finalizeConfig();
            fail("We should get the connector not set with TSLServerParameter exception.");
        } catch (Exception ex) {
            // expect the excepion
        }

        engine = new JettyHTTPServerEngine();
        conn = new SelectChannelConnector();
        conn.setPort(9002);
        engine.setConnector(conn);
        engine.setPort(9000);
        try {
            engine.finalizeConfig();
            fail("We should get the connector not set right port exception.");
        } catch (Exception ex) {
            // expect the exception
        }

        engine = new JettyHTTPServerEngine();
        conn = new SslSocketConnector();
        conn.setPort(9003);
        engine.setConnector(conn);
        engine.setPort(9003);
        engine.setTlsServerParameters(new TLSServerParameters());
        engine.finalizeConfig();
    }
View Full Code Here

Examples of org.eclipse.jetty.server.Connector

        servletContext.addServlet(holder, "/system/console/topology/*");

        jettyServer = new Server();
        jettyServer.setHandler(servletContext);
        Connector connector=new SelectChannelConnector();
        jettyServer.setConnectors(new Connector[]{connector});
        jettyServer.start();
    }
View Full Code Here

Examples of org.eclipse.jetty.server.Connector

            if (State.QUIESCED.equals(port.getActualState()))
            {
                continue;
            }

            Connector connector = null;

            Collection<Transport> transports = port.getTransports();
            if (!transports.contains(Transport.SSL))
            {
                connector = new SelectChannelConnector();
            }
            else if (transports.contains(Transport.SSL))
            {
                KeyStore keyStore = port.getKeyStore();
                if (keyStore == null)
                {
                    throw new IllegalConfigurationException("Key store is not configured. Cannot start management on HTTPS port without keystore");
                }
                SslContextFactory factory = new SslContextFactory();
                try
                {
                    SSLContext sslContext = SSLContext.getInstance("TLS");
                    sslContext.init(keyStore.getKeyManagers(), null, null);
                    factory.setSslContext(sslContext);
                }
                catch (GeneralSecurityException e)
                {
                    throw new RuntimeException("Cannot configure port " + port.getName() + " for transport " + Transport.SSL, e);
                }
                connector = new SslSocketConnector(factory);
            }
            else
            {
                throw new IllegalArgumentException("Unexpected transport on port " + port.getName() + ":" + transports);
            }
            lastPort = port.getPort();
            connector.setPort(port.getPort());
            server.addConnector(connector);
        }

        ServletContextHandler root = new ServletContextHandler(ServletContextHandler.SESSIONS);
        root.setContextPath("/");
View Full Code Here

Examples of org.eclipse.jetty.server.Connector

        webapp.setExtractWAR(true);
        webapp.setWar(args[0]);
        webapp.setDefaultsDescriptor(webdefaultPath());

        Server server = new Server();
        Connector connector = new SelectChannelConnector();
        connector.setPort(Integer.getInteger("jetty.port",8080).intValue());
        server.setConnectors(new Connector[]{connector});
        server.setHandler(webapp);
        server.start();
        server.join();
    }
View Full Code Here

Examples of org.eclipse.jetty.server.Connector

    @Override
    public Object addingService(ServiceReference reference)
    {
        ConnectorFactory factory = (ConnectorFactory) super.addingService(reference);
        Connector connector = factory.createConnector();
        try
        {
            this.server.addConnector(connector);
            connector.start();
            return connector;
        }
        catch (Exception e)
        {
            SystemLogger.error("Failed starting connector '" + connector + "' provided by " + reference, e);
View Full Code Here

Examples of org.eclipse.jetty.server.Connector

    }

    @Override
    public void removedService(ServiceReference reference, Object service)
    {
        Connector connector = (Connector) service;
        if (connector.isStarted())
        {
            try
            {
                connector.stop();
            }
            catch (Exception e)
            {
                SystemLogger.info("Failed stopping connector '" + connector + "' provided by " + reference + ": " + e);
            }
View Full Code Here

Examples of org.eclipse.jetty.server.Connector

        return version;
    }

    private boolean initializeHttp()
    {
        Connector connector = this.config.isUseHttpNio() ? new SelectChannelConnector() : new SocketConnector();
        configureConnector(connector, this.config.getHttpPort());
        return startConnector(connector);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.