Examples of createChannel()


Examples of de.nava.informa.core.ChannelBuilderIF.createChannel()

    assertEquals("myChannel", chA.getTitle());
  }

  public void testCreateItem() throws MalformedURLException {
    ChannelBuilderIF builder = new ChannelBuilder();
    ChannelIF chA = builder.createChannel("myChannel");
    ItemIF itA = builder.createItem(chA, "first item", "descr of item",
                                    new URL("http://sf.net/projects/informa"));
    itA.setCreator("TestChannelBuilder");
    assertEquals("first item", itA.getTitle());
    itA = null;
View Full Code Here

Examples of io.undertow.websockets.core.protocol.Handshake.createChannel()

                    facade.putAttachment(HandshakeUtil.PATH_PARAMS, matchResult.getParameters());
                    final Handshake selected = handshaker;
                    facade.upgradeChannel(new HttpUpgradeListener() {
                        @Override
                        public void handleUpgrade(StreamConnection streamConnection, HttpServerExchange exchange) {
                            WebSocketChannel channel = selected.createChannel(facade, streamConnection, facade.getBufferPool());
                            peerConnections.add(channel);
                            callback.onConnect(facade, channel);
                        }
                    });
                    handshaker.handshake(facade);
View Full Code Here

Examples of io.undertow.websockets.core.protocol.Handshake.createChannel()

            final Handshake selected = handshaker;
            if (upgradeListener == null) {
                exchange.upgradeChannel(new HttpUpgradeListener() {
                    @Override
                    public void handleUpgrade(StreamConnection streamConnection, HttpServerExchange exchange) {
                        WebSocketChannel channel = selected.createChannel(facade, streamConnection, facade.getBufferPool());
                        callback.onConnect(facade, channel);
                    }
                });
            } else {
                exchange.upgradeChannel(upgradeListener);
View Full Code Here

Examples of io.undertow.websockets.core.protocol.Handshake.createChannel()

            final Handshake selected = handshaker;
            if (upgradeListener == null) {
                exchange.upgradeChannel(new HttpUpgradeListener() {
                    @Override
                    public void handleUpgrade(StreamConnection streamConnection, HttpServerExchange exchange) {
                        WebSocketChannel channel = selected.createChannel(facade, streamConnection, facade.getBufferPool());
                        peerConnections.add(channel);
                        callback.onConnect(facade, channel);
                    }
                });
            } else {
View Full Code Here

Examples of net.rim.blackberry.api.bbm.platform.service.MessagingService.createChannel()

            final MessagingService msgService = BBMPlatformNamespace.getInstance().getMessagingService();
            if(type.equals(TYPE_CHANNEL)) {
                final ConnectionListenerImpl connListenerImpl = new ConnectionListenerImpl();
                final BBMPlatformChannelListener channelListener = new ChannelListener(connListenerImpl);
               
                final BBMPlatformChannel channel = msgService.createChannel(channelListener);
                ChannelObject connObj = new ChannelObject(channel, true);
                connListenerImpl.setConnectionObject(connObj);
               
                return connObj;
            } else if(type.equals(TYPE_SESSION)) {
View Full Code Here

Examples of org.apache.servicemix.nmr.api.NMR.createChannel()

  }

    @Override
    protected void doStart() throws Exception {
        NMR nmr = getEndpoint().getComponent().getNmr();
        client = nmr.createChannel();
    }

    @Override
    protected void doStop() throws Exception {
        client.close();
View Full Code Here

Examples of org.apache.servicemix.nmr.api.NMR.createChannel()

        waitOnContextCreation("org.apache.servicemix.examples.itests.cxf-nmr-osgi");
        Thread.sleep(5000);
        NMR nmr = getOsgiService(NMR.class);
        assertNotNull(nmr);
       
        Channel client = nmr.createChannel();
        Exchange e = client.createExchange(Pattern.InOut);
        for (Endpoint ep : nmr.getEndpointRegistry().getServices()) {
          e.setTarget(nmr.getEndpointRegistry().lookup(nmr.getEndpointRegistry().getProperties(ep)));
          e.getIn().setBody(new StringSource("<?xml version=\"1.0\" encoding=\"UTF-8\"?><soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\"><soap:Body><ns2:sayHi xmlns:ns2=\"http://cxf.examples.servicemix.apache.org/\"><arg0>Bonjour</arg0></ns2:sayHi></soap:Body></soap:Envelope>"));
          boolean res = client.sendSync(e);
View Full Code Here

Examples of org.apache.servicemix.nmr.core.ServiceMix.createChannel()

        ep.getTarget().setService(new QName("target"));
        eip.setEndpoints(new EIPEndpoint[] { ep });
        eip.init(new ComponentContextImpl(reg, new SimpleComponentWrapper(eip), new HashMap()));
        eip.getLifeCycle().start();

        Channel channel = smx.createChannel();
        Exchange e = channel.createExchange(Pattern.InOnly);
        e.getIn().setBody("<hello/>");
        e.setTarget(smx.getEndpointRegistry().lookup(ServiceHelper.createMap(Endpoint.NAME, "{uri:foo}bar:ep")));
        channel.sendSync(e);
    }
View Full Code Here

Examples of org.apache.sshd.ClientSession.createChannel()

            if (!authResult.isDone() || authResult.isFailure()) {
                log.debug("Failed to authenticate");
                throw new RuntimeCamelException("Failed to authenticate username " + getUsername());
            }
       
            channel = session.createChannel(ClientChannel.CHANNEL_EXEC, command);

            ByteArrayInputStream in = new ByteArrayInputStream(new byte[]{0});
            channel.setIn(in);
   
            ByteArrayOutputStream out = new ByteArrayOutputStream();
View Full Code Here

Examples of org.apache.sshd.ClientSession.createChannel()

        client.start();
        try {
            final ClientSession session = client.connect("localhost", 4222).await().getSession();
            session.authPassword("jonathan", "secret");

            final ClientChannel channel = session.createChannel("shell");
            ByteArrayOutputStream sent = new ByteArrayOutputStream();
            PipedOutputStream pipedIn = new TeePipedOutputStream(sent);
            channel.setIn(new PipedInputStream(pipedIn));
            ByteArrayOutputStream out = new ByteArrayOutputStream();
            ByteArrayOutputStream err = new ByteArrayOutputStream();
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.