Examples of Transport


Examples of org.apache.juddi.v3.client.transport.Transport

    }
    logger.debug("Getting auth tokens..");
    try {
           Class<?> transportClass = ClassUtil.forName(clazz, Transport.class);
           if (transportClass!=null) {
             Transport transport = (Transport) transportClass.getConstructor(String.class).newInstance("default");
            
             UDDISecurityPortType security = transport.getUDDISecurityService();
             authInfoJoe = TckSecurity.getAuthToken(security, TckPublisher.JOE_PUBLISHER_ID,  TckPublisher.JOE_PUBLISHER_CRED);
             Assert.assertNotNull(authInfoJoe);
            
             UDDIPublicationPortType publication = transport.getUDDIPublishService();
             UDDIInquiryPortType inquiry = transport.getUDDIInquiryService();
            
             tckTModel  = new TckTModel(publication, inquiry);
             tckBusiness = new TckBusiness(publication, inquiry);
             tckBusinessService = new TckBusinessService(publication, inquiry);
             tckBindingTemplate = new TckBindingTemplate(publication, inquiry);
View Full Code Here

Examples of org.apache.qpid.proton.engine.Transport

    {
        EngineFactory engineFactory = new ProtonFactoryLoader<EngineFactory>(EngineFactory.class).loadFactory();

        Connection connection1 = engineFactory.createConnection();
        Connection connection2 = engineFactory.createConnection();;
        Transport transport1 = engineFactory.createTransport();
        transport1.bind(connection1);

        Transport transport2 = engineFactory.createTransport();
        transport2.bind(connection2);

        assertEquals(EndpointState.UNINITIALIZED, connection1.getLocalState());
        assertEquals(EndpointState.UNINITIALIZED, connection1.getRemoteState());

        connection1.open();
View Full Code Here

Examples of org.apache.ws.scout.transport.Transport

   * "org.apache.ws.scout.transport.AxisTransport" is created and returned.
   *
   * @return Transport
   */
  public Transport getTransport(String className) {
    Transport transport = null;
    Class transportClass = null;

    // If a Transport class name isn't supplied use
    // the default Transport implementation.
    if (className == null)
View Full Code Here

Examples of org.ardverk.dht.io.transport.Transport

      RequestEntity entity = new RequestEntity(
          contactId, request);
      entityManager.add(callback, entity, timeout, unit);
    }
   
    Transport transport = null;
    synchronized (this) {
      transport = this.transport;
    }
   
    if (transport == null) {
      throw new IOException();
    }
   
    transport.send(contactId, request, timeout, unit);
    fireMessageSent(contactId, request);
  }
View Full Code Here

Examples of org.atmosphere.socketio.transport.Transport

                return Action.CANCELLED;
            } else if (protocol != null && version == null) {
                version = "0";
            }

            final Transport transport = transports.get(protocol + "-" + version);
            if (transport != null) {
                if (!SocketIOAtmosphereHandler.class.isAssignableFrom(atmosphereHandler.getClass())) {
                    response.asyncIOWriter(new AsyncIOWriterAdapter() {
                        @Override
                        public AsyncIOWriter write(AtmosphereResponse r, String data) throws IOException {
                            SocketIOSessionOutbound outbound = (SocketIOSessionOutbound)
                                    request.getAttribute(SocketIOAtmosphereHandler.SOCKETIO_SESSION_OUTBOUND);
                            SocketIOSessionManagerImpl.SocketIOProtocol p = (SocketIOSessionManagerImpl.SocketIOProtocol)
                                    r.request().getAttribute(SOCKETIO_PACKET);

                            String msg = p == null ? data : mapper.writeValueAsString(p.clearArgs().addArgs(data));

                            if (outbound != null) {
                                outbound.sendMessage(new SocketIOPacketImpl(SocketIOPacketImpl.PacketType.EVENT, msg));
                            } else {
                                r.getResponse().getOutputStream().write(msg.getBytes(r.getCharacterEncoding()));
                            }
                            return this;
                        }

                        @Override
                        public AsyncIOWriter write(AtmosphereResponse r, byte[] data) throws IOException {
                            SocketIOSessionManagerImpl.SocketIOProtocol p = (SocketIOSessionManagerImpl.SocketIOProtocol)
                                    r.request().getAttribute(SOCKETIO_PACKET);
                            if (p == null) {
                                r.getResponse().getOutputStream().write(data);
                            } else {
                                write(r, new String(data, r.request().getCharacterEncoding()));
                            }
                            return this;
                        }

                        @Override
                        public AsyncIOWriter write(AtmosphereResponse r, byte[] data, int offset, int length) throws IOException {
                            SocketIOSessionManagerImpl.SocketIOProtocol p = (SocketIOSessionManagerImpl.SocketIOProtocol)
                                    r.request().getAttribute(SOCKETIO_PACKET);
                            if (p == null) {
                                r.getResponse().getOutputStream().write(data, offset, length);
                            } else {
                                write(r, new String(data, offset, length, r.request().getCharacterEncoding()));
                            }
                            return this;
                        }

                        @Override
                        public AsyncIOWriter flush(AtmosphereResponse r) throws IOException {
                            try {
                                r.getResponse().getOutputStream().flush();
                            } catch (IllegalStateException ex) {
                                r.getResponse().getWriter().flush();
                            }
                            return this;
                        }

                        @Override
                        public AsyncIOWriter writeError(AtmosphereResponse r, int errorCode, String message) throws IOException {
                            ((HttpServletResponse) r.getResponse()).sendError(errorCode, message);
                            return this;
                        }
                    });
                }
                transport.handle((AtmosphereResourceImpl) r, atmosphereHandler, getSessionManager(version));
            } else {
                logger.error("Protocol not supported : " + protocol);
            }
        } catch (Exception e) {
            logger.error("", e);
View Full Code Here

Examples of org.codehaus.xfire.transport.Transport

    XFire xfire;
    ServiceStat serviceStat;
   
    public void testTransports() throws Exception
    {
        Transport t = getTransportManager().getTransport(LocalTransport.BINDING_ID);
       
        assertTrue( t instanceof LocalTransport );
       
        Channel channel = t.createChannel();
       
        assertTrue( channel instanceof LocalChannel );
    }
View Full Code Here

Examples of org.codehaus.xfire.transport.Transport

    }

    public void testInvoke()
            throws Exception
    {
        Transport transport = getTransportManager().getTransport(LocalTransport.BINDING_ID);
        Client client = new Client(transport, service, "xfire.local://Echo");
        client.setXFire(getXFire());
       
        OperationInfo op = service.getServiceInfo().getOperation("echo");
        Object[] response = client.invoke(op, new Object[] {"hello"});
View Full Code Here

Examples of org.codehaus.xfire.transport.Transport

    }

    public void testInvoke()
            throws Exception
    {
        Transport transport = getTransportManager().getTransport(LocalTransport.BINDING_ID);
        Client client = new Client(transport, service, "xfire.log://Echo");
        client.setXFire(getXFire());

        OperationInfo op = service.getServiceInfo().getOperation("echo");
        Object[] response = client.invoke(op, new Object[] { null });
View Full Code Here

Examples of org.codehaus.xfire.transport.Transport

            throws Exception
    {
        Element root = new Element("root", "a", "urn:a");
        root.addContent("hello");
       
        Transport transport = getTransportManager().getTransport(SoapHttpTransport.SOAP11_HTTP_BINDING);

        Client client = new Client(transport, service, "http://localhost:8391/Echo");

//        HttpClientParams params = new HttpClientParams();
//        params.setParameter("http.protocol.version", HttpVersion.HTTP_1_1);
View Full Code Here

Examples of org.codehaus.xfire.transport.Transport

            throws Exception
    {
        Element root = new Element("root", "a", "urn:a");
        root.addContent("hello");
       
        Transport transport = getTransportManager().getTransport(SoapHttpTransport.SOAP11_HTTP_BINDING);

        Client client = new Client(transport, service, "http://localhost:8391/Echo");

        OperationInfo op = service.getServiceInfo().getOperation("echo");
        Soap11Binding binding = (Soap11Binding) service.getBinding(SoapHttpTransport.SOAP11_HTTP_BINDING);
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.