Examples of Bridge


Examples of com.sun.messaging.bridge.service.Bridge

     *
     */
    public synchronized void unloadBridge(String name) throws Exception {
        _bc.logInfo("Unloading bridge "+name, null);

        Bridge b = _bridges.get(name);
        if (b == null) {
            _bc.logInfo("Bridge "+name+" is not loaded."null);
            throw new BridgeException("Bridge "+name+" is not loaded.", Status.NOT_MODIFIED);
        }
        stopBridge(name, null, null);
        _bridges.remove(name);
        b.setName(null);

        Properties props = _bc.getBridgeConfig();
        List<String> alist = BridgeUtil.getListProperty(
                                props.getProperty(
                                BridgeBaseContext.PROP_PREFIX)+".activelist", props);
View Full Code Here

Examples of com.sun.messaging.bridge.service.Bridge

            oneRow[0] =  bmr.getString(BridgeCmdSharedResources.I_BGMGR_TITLE_BRIDGE_NAME);
            oneRow[1] =  bmr.getString(BridgeCmdSharedResources.I_BGMGR_TITLE_BRIDGE_TYPE);
            oneRow[2] =  bmr.getString(BridgeCmdSharedResources.I_BGMGR_TITLE_BRIDGE_STATE);
            reply.addTitle(oneRow);

            Bridge b = null;
            for (Map.Entry<String, Bridge> pair: _bridges.entrySet()) {
                b = pair.getValue();
                if (type != null && !b.getType().equals(type)) continue;
                oneRow[0] = b.getName();
                oneRow[1] = b.getType();
                oneRow[2] = b.getState().toString(bmr);
                reply.add(oneRow);
            }
            _bc.logDebug("Listed all bridges (type="+type+")", null);
            ArrayList<BridgeCmdSharedReplyData> replys = new ArrayList<BridgeCmdSharedReplyData>();
            replys.add(reply);
            return replys;
        }                

        if (args == null) {
            _bc.logInfo(_bmr.getString(_bmr.I_LISTING_BRIDGE, name), null);
        } else {
            _bc.logInfo(_bmr.getString(_bmr.I_LISTING_BRIDGE_WITH, name, BridgeContext.toString(args)), null);
        }

        Bridge b = _bridges.get(name);
        if (b == null) {
            String emsg = _bmr.getKString(_bmr.X_BRIDGE_NAME_NOT_FOUND, name);
            _bc.logError(emsg, null);
            throw new BridgeException(emsg);
        }

        BridgeContext bc = new BridgeContext(_bc, b.getName());
        return b.list(bc, args, bmr);
    }
View Full Code Here

Examples of com.sun.messaging.bridge.service.Bridge

    /**
     *
     */
    public Bridge getBridge(String name) throws Exception {
        Bridge b = _bridges.get(name);
        if (b == null) {
            throw new BridgeException(_bmr.getKString(_bmr.X_BRIDGE_NAME_NOT_FOUND, name));
        }
        return b;
    }
View Full Code Here

Examples of com.sun.xml.bind.api.Bridge

        List<Class<?>> clses = new ArrayList<Class<?>>(ctxClasses);
        clses.add(ref.type.getClass());
        try {
            JAXBRIContext riContext = JAXBRIContext.newInstance(clses.toArray(new Class[clses.size()]),
                                                                    typeRefs, null, null, true, null);
            Bridge bridge = riContext.createBridge(ref);

            if (source instanceof XMLStreamWriter) {
                bridge.marshal(elValue, (XMLStreamWriter)source);
            } else if (source instanceof OutputStream) {
                //the namespace is missing when marshal the xsd:QName type
                //to the OutputStream directly
                java.io.StringWriter sw = new java.io.StringWriter();
                StreamResult s1 = new StreamResult(sw);
                bridge.marshal(elValue, s1);
                ((OutputStream)source).write(sw.toString().getBytes());
            } else if (source instanceof Node) {
                bridge.marshal(elValue, (Node)source);
            } else {
                throw new Fault(new Message("UNKNOWN_SOURCE", BUNDLE, source.getClass().getName()));
            }
        } catch (Exception ex) {
            ex.printStackTrace();
View Full Code Here

Examples of com.sun.xml.internal.bind.api.Bridge

    /**
     * @return the <code>Bridge</code> for the <code>type</code>
     */
    public final Bridge getBridge(TypeReference type) {
        Bridge b = bridgeMap.get(type);
        assert b!=null; // we should have created Bridge for all TypeReferences known to this model
        return b;
    }
View Full Code Here

Examples of javax.portlet.faces.Bridge

    throws PortletException, IOException
  {
    if (getTestName().equals(EXCEPTIONTHROWN_NODEFAULTVIEWID_TEST))
    {

      Bridge bridge = super.getFacesBridge(renderRequest, renderResponse);
      try
      {
        bridge.doFacesRequest(renderRequest, renderResponse);
      }
      catch (BridgeDefaultViewNotSpecifiedException e)
      {
        outputTestResult(renderResponse, Boolean.TRUE, "Correctly threw BridgeDefaultViewNotSpecifiedException when no default defined.");
      }
      catch (Exception e)
      {
        outputTestResult(renderResponse, Boolean.FALSE, "Didn't throw BridgeDefaultViewNotSpecifiedException when no default defined.");
      }
    }
    else if (getTestName().equals(BRIDGESETSCONTENTTYPE_TEST))
    {
      // By invoking the bridge directly (and not setting the contentType)
      // we force the bridge to have to do the work
      Bridge bridge = super.getFacesBridge(renderRequest, renderResponse);
      bridge.doFacesRequest(renderRequest, renderResponse);
    }
    else if (getTestName().equals(VIEWIDWITHPARAM_TEST))
    {
      renderRequest.setAttribute(Bridge.VIEW_ID, "/tests/SingleRequestTest.jsp?param1=testValue");
      super.doDispatch(renderRequest, renderResponse);
View Full Code Here

Examples of juzu.impl.bridge.Bridge

    if (module == null) {
      context.setAttribute("juzu.module", module = new ModuleContextImpl(portletLogger, bridgeContext, resolver));
    }

    //
    Bridge bridge;
    if (injector.isProvided()) {
      bridge = new ProvidedBridge(bridgeContext, bridgeConfig, server, resolver, injector);
    } else {
      bridge = new ApplicationBridge(module, bridgeContext, bridgeConfig, server, resolver, injector);
    }
View Full Code Here

Examples of org.apache.batik.bridge.Bridge

        }

        if (clrDef == null)
            return Color.black;

        Bridge bridge = ctx.getBridge(clrDef);
        if (bridge == null || !(bridge instanceof PaintBridge))
            return Color.black;

        return ((PaintBridge)bridge).createPaint(ctx, clrDef,
                                                 paintedElement,
View Full Code Here

Examples of org.apache.flex.forks.batik.bridge.Bridge

        }

        if (clrDef == null)
            return Color.black;

        Bridge bridge = ctx.getBridge(clrDef);
        if (bridge == null || !(bridge instanceof PaintBridge))
            return Color.black;

        return ((PaintBridge)bridge).createPaint(ctx, clrDef,
                                                 paintedElement,
View Full Code Here

Examples of org.hornetq.core.server.cluster.Bridge

         ClientConsumer cons1 = session1.createConsumer(queueName0);

         session1.start();

         // Now we will simulate a failure of the bridge connection between server0 and server1
         Bridge bridge = server0.getClusterManager().getBridges().get(bridgeName);
         RemotingConnection forwardingConnection = getForwardingConnection(bridge);
         InVMConnector.failOnCreateConnection = true;
         InVMConnector.numberOfFailures = reconnectAttempts - 1;
         forwardingConnection.fail(new HornetQException(HornetQException.NOT_CONNECTED));
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.