Package org.wso2.carbon.core.transports

Examples of org.wso2.carbon.core.transports.TransportService


   
    protected static SVGImpl generateSVGImpl(java.io.InputStream is) throws java.io.IOException {
      byte[] b=new byte[is.available()];
      is.read(b);
   
      BPELInterface bpel = new BPELImpl();
        OMElement bpelStr = bpel.load(new String(b));
       
        bpel.processBpelString(bpelStr);

        LayoutManager layoutManager = BPEL2SVGFactory.getInstance().getLayoutManager();
        layoutManager.setVerticalLayout(true);
        layoutManager.setYSpacing(20);
        layoutManager.setYSpacing(50);
        layoutManager.layoutSVG(bpel.getRootActivity());

        SVGImpl svg = new SVGImpl();
        svg.setRootActivity(bpel.getRootActivity());
       
        return(svg);
    }
View Full Code Here


   * @param transformer The optional image transformer
   * @throws java.io.IOException Failed to generate the representation
   */
    public static void generate(java.io.InputStream is, java.io.OutputStream os,
                SVGImageTransformer transformer) throws java.io.IOException {
        SVGImpl svg = generateSVGImpl(is);
       
        if (transformer == null) {
          String str=svg.getHeaders()+svg.generateSVGString();
          os.write(str.getBytes());
        } else {
          transformer.transform(svg, os);
        }
    }
View Full Code Here

        layoutManager.setVerticalLayout(true);
        layoutManager.setYSpacing(20);
        layoutManager.setYSpacing(50);
        layoutManager.layoutSVG(bpel.getRootActivity());

        SVGImpl svg = new SVGImpl();
        svg.setRootActivity(bpel.getRootActivity());
       
        return(svg);
    }
View Full Code Here

    // supported by those.
    transports = transportStore.getAvailableTransports();
    transCollection = new ArrayList<TransportSummary>();

    for (Iterator<TransportService> iter = transports.values().iterator(); iter.hasNext();) {
      TransportService transportService;
      TransportSummary summary;

      transportService = iter.next();
      // TransportSummary only needs a subset of information from TransportInfo.
      summary = new TransportSummary();
      summary.setProtocol(transportService.getName());
      // All transports already loaded in to axis2configuration are considered as active.
      // Inactive transports still available in the management UI so the user can enable
      // those.
      summary.setListenerActive(transportService.isEnabled(true, getAxisConfig()));
            summary.setSenderActive(transportService.isEnabled(false, getAxisConfig()));
            transCollection.add(summary);
        }

    return transCollection.toArray(new TransportSummary[transCollection.size()]);
  }
View Full Code Here

    // If the service is UT enabled then the only transport that can be
    // exposed is HTTPS.
    isUTEnabled = isUTEnabled(serviceName);

    for (Iterator<TransportService> iter = transports.values().iterator(); iter.hasNext();) {
      TransportService transportService;
      TransportSummary summary;

      transportService = iter.next();

      summary = new TransportSummary();
      summary.setProtocol(transportService.getName());
      // All transports already loaded in to axis2configuration are considered as active.
      // Inactive transports still available in the management UI so the user can enable
      // those.
      summary.setListenerActive(transportService.isEnabled(true, getAxisConfig()));
            summary.setSenderActive(transportService.isEnabled(false, getAxisConfig()));
            // Only active transports are considered here.
      if (summary.isListenerActive()) {
        if (isUTEnabled) {
          // If the service is UT enabled then the only transport that can be
          // exposed is HTTPS.
          if (ServerConstants.HTTPS_TRANSPORT.equalsIgnoreCase(transportService.getName())) {
            transCollection.add(summary);
          }
        } else {
          transCollection.add(summary);
        }
View Full Code Here

   * @param transportProtocol Name of the transport where details are required.
   * @return TransportDetails
   * @throws Exception on error
   */
  public TransportDetails getTransportDetails(String transportProtocol) throws Exception {
    TransportService transportService;
    TransportDetails details;

    if (transportProtocol == null) {
      if (log.isDebugEnabled()) {
        log.debug("Invalid transport name");
      }
      throw new Exception("Invalid transport name");
    }

    // All transport bundles update the TransportStore - with the corresponding transports
    // supported by those.
    transportService = TransportStore.getInstance().getTransport(transportProtocol);
        if (transportService != null) {
            details = new TransportDetails();
            details.setListenerActive(transportService.isEnabled(true, getAxisConfig()));
            details.setSenderActive(transportService.isEnabled(false, getAxisConfig()));
            details.setInParameters(transportService.getGlobalTransportParameters(true, getAxisConfig()));
            details.setOutParameters(transportService.getGlobalTransportParameters(false, getAxisConfig()));
            return details;
        } else {
            log.warn("Transport service not available for : " + transportProtocol);
            return null;
        }
View Full Code Here

     * @param transport name of the transport
     * @return an array of transport parameters or null
     * @throws Exception on error
     */
    public TransportParameter[] getGloballyDefinedInParameters(String transport) throws Exception {
        TransportService service = TransportStore.getInstance().getTransport(transport);
        if (service != null) {
            return service.getGlobalTransportParameters(true, getAxisConfig());
        }
        return null;
    }
View Full Code Here

     * @param transport name of the transport
     * @return an array of TransportParameter objects or null
     * @throws Exception on error
     */
    public TransportParameter[] getGloballyDefinedOutParameters(String transport) throws Exception {
        TransportService service = TransportStore.getInstance().getTransport(transport);
        if (service != null) {
            return service.getGlobalTransportParameters(false, getAxisConfig());
        }
        return null;
    }
View Full Code Here

     * @throws Exception on error
     */
    public void updateGloballyDefinedInParameters(String transport,
                                                  TransportParameter[] params) throws Exception {

        TransportService service = TransportStore.getInstance().getTransport(transport);
        if (service != null) {
            service.updateGlobalTransportParameters(params, true, getConfigContext());
        } else {
            throw new Exception("Transport management service is not available for : " + transport);
        }
    }
View Full Code Here

     * @throws Exception on error
     */
    public void updateGloballyDefinedOutParameters(String transport,
                                                  TransportParameter[] params) throws Exception {

        TransportService service = TransportStore.getInstance().getTransport(transport);
        if (service != null) {
            service.updateGlobalTransportParameters(params, false, getConfigContext());
        } else {
            throw new Exception("Transport management service is not available for : " + transport);
        }
    }
View Full Code Here

TOP

Related Classes of org.wso2.carbon.core.transports.TransportService

Copyright © 2018 www.massapicom. 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.