Package javax.jbi.messaging

Examples of javax.jbi.messaging.MessageExchange$Role


        return response;
    }

    private Role toModel(RoleData model) {
        Role role = new Role();
        role.id = "" + model.getId();
        role.name = model.getName();
        // if (model.hasDescription()) {
        // role.description = model.getDescription();
        // }
View Full Code Here


        return response;
    }

    private Role toModel(RoleData data) {
        Role role = new Role();
        role.id = "" + data.getId();
        role.name = data.getName();
        return role;
    }
View Full Code Here

                RoleData role = identityService.findRole(roleId);
                if (role == null) {
                    throw new IllegalStateException();
                }

                Role model = toModel(project, role);
                user.roles.add(model);
            }
        }

        log.info("Returning auth: {}", response);
View Full Code Here

        return Lists.newArrayList(v2Endpoints.values());
    }

    private Role toModel(ProjectData project, RoleData role) {
        Role model = new Role();
        model.id = "" + role.getId();
        model.name = role.getName();
        if (project != null) {
            model.tenantId = "" + project.getId();
        }
View Full Code Here

            ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
            LOG.finest("building document from bytes");
            DocumentBuilder builder = docBuilderFactory.newDocumentBuilder();
            Document doc = builder.parse(bais);
           
            MessageExchange xchng = (MessageExchange)ctx.get(MESSAGE_EXCHANGE_PROPERTY);
            LOG.fine("creating NormalizedMessage");
            NormalizedMessage msg = xchng.createMessage();
            msg.setContent(new DOMSource(doc));
            xchng.setMessage(msg, "out");
            LOG.fine("postDispatch sending out message to NWR");
            channel.send(xchng);
        } catch (Exception ex) {
            LOG.log(Level.SEVERE, "error sending Out message", ex);
        }
View Full Code Here

           
            try {
                running = true;
                LOG.fine("JBIServerTransport message receiving thread started");
                do {
                    MessageExchange exchange = channel.accept();
                    if (exchange != null) {
                        // REVISIT: serialized message handling not such a
                        // good idea.
                        // REVISIT: can there be more than one ep?
                        ServiceEndpoint ep = exchange.getEndpoint();
                        CeltixServiceUnit csu = suManager.getServiceUnitForEndpoint(ep);
                        ClassLoader oldLoader = Thread.currentThread().getContextClassLoader();
                       
                        try {
                            Thread.currentThread().setContextClassLoader(csu.getClassLoader());
View Full Code Here

        super(Phase.PRE_INVOKE);
    }

    public void handleMessage(Message message) {
        try {
            MessageExchange exchange;
            NormalizedMessage nm;
            // Create message
            if (!isRequestor(message)) {
                exchange = createExchange(message);
                nm = exchange.createMessage();
                exchange.setMessage(nm, "in");
                message.setContent(MessageExchange.class, exchange);
            } else {
                exchange = message.getContent(MessageExchange.class);
                if (exchange == null) {
                    throw new IllegalStateException("Content of type "
                            + MessageExchange.class + " not found on message");
                }
                if (message.getContent(Exception.class) == null) {
                    nm = exchange.createMessage();
                    exchange.setMessage(nm, "out");
                } else {
                    exchange.setFault(exchange.createFault());
                    nm = exchange.getFault();
                }
            }
            // Put headers
            toNMSHeaders(nm, message);
            // Put attachments
View Full Code Here

                }
                dv = cc.getDeliveryChannel();
            }
            mef = dv.createExchangeFactory();
        }
        MessageExchange me = mef.createExchange(mep);
        me.setOperation(operation.getName());
        return me;
    }
View Full Code Here

        assertEquals("wrong number of messages", numMessages, ml.getMessageCount());
        for (int i = 0; i < numMessages; i++) {
            assertSequenceProperties((NormalizedMessage)ml.getMessages().get(i), i + 1);
        }
        for (int i = 0; i < numMessages; i++) {
            MessageExchange me = (InOnly)client.receive();
            assertEquals(ExchangeStatus.DONE, me.getStatus());
        }
    }
View Full Code Here

     */
    protected void processSync(MessageExchange exchange) throws Exception {
        if (!(exchange instanceof InOut)) {
            throw new IllegalStateException("Use an InOut MEP");
        }
        MessageExchange current = exchange;
        for (int i = 0; i < targets.length; i++) {
            InOut me = getExchangeFactory().createInOutExchange();
            targets[i].configureTarget(me, getContext());
            if (i == 0) {
                MessageUtil.transferInToIn(current, me);
View Full Code Here

TOP

Related Classes of javax.jbi.messaging.MessageExchange$Role

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.