Package org.wso2.carbon.messagebox.admin.internal.exception

Examples of org.wso2.carbon.messagebox.admin.internal.exception.MessageBoxAdminException


    public int getQueuesCount() throws MessageBoxAdminException {
        try {
            QueueManager queueManager = MessageBoxHolder.getInstance().getMessageboxService().getQueueManager();
            return queueManager.getAllQueues().size();
        } catch (MessageBoxException e) {
            throw new MessageBoxAdminException("Failed to get total number of queues.", e);
        }
    }
View Full Code Here


                adminQueueUserPermission.setAllowedToPublish(queueUserPermission.isAllowedToPublish());
                adminQueueUserPermissions.add(adminQueueUserPermission);
            }
            return adminQueueUserPermissions.toArray(new QueueUserPermissionBean[adminQueueUserPermissions.size()]);
        } catch (MessageBoxException e) {
            throw new MessageBoxAdminException("Unable to access the queue manager", e);
        }

    }
View Full Code Here

                adminQueueRolePermission.setAllowedToPublish(queueRolePermission.isAllowedToPublish());
                adminQueueRolePermissions.add(adminQueueRolePermission);
            }
            return adminQueueRolePermissions.toArray(new QueueRolePermissionBean[adminQueueRolePermissions.size()]);
        } catch (MessageBoxException e) {
            throw new MessageBoxAdminException("Unable to access the queue manager", e);
        }

    }
View Full Code Here

        try {
            QueueManager queueManager =
                    MessageBoxHolder.getInstance().getMessageboxService().getQueueManager();
            queueManager.addQueue(queueName, MessageBoxConstants.MB_QUEUE_CREATED_FROM_AMQP);
        } catch (MessageBoxException e) {
            throw new MessageBoxAdminException("Failed to add the queue:"+queueName, e);
        }
    }
View Full Code Here

                queueUserPermission.setAllowedToPublish(adminQueueUserPermission.isAllowedToPublish());
                queueUserPermissions.add(queueUserPermission);
            }
            queueManager.updateUserPermission(queueUserPermissions, queueName);
        } catch (MessageBoxException e) {
            throw new MessageBoxAdminException("Unable to access the queue manager", e);
        }
    }
View Full Code Here

                queueRolePermission.setAllowedToPublish(adminQueueRolePermission.isAllowedToPublish());
                queueRolePermissions.add(queueRolePermission);
            }
            queueManager.updateRolePermission(queueRolePermissions, queueName);
        } catch (MessageBoxException e) {
            throw new MessageBoxAdminException("Unable to access the queue manager", e);
        }
    }
View Full Code Here

        try {
            QueueManager queueManager =
                    MessageBoxHolder.getInstance().getMessageboxService().getQueueManager();
            queueManager.deleteQueue(queueName);
        } catch (MessageBoxException e) {
            throw new MessageBoxAdminException(e.getMessage());
        }
    }
View Full Code Here

        }

        public void run() {
            try {
                MessageContext msgCtx = ((Axis2MessageContext) synCtx).getAxis2MessageContext();
                Event<MessageContext> event = new Event(msgCtx);
                subscriptions = subscriptionManager.getMatchingSubscriptions(event);
            } catch (EventException e) {
                handleException("Matching subscriptions fetching error", e);
            }
View Full Code Here

     * @throws EventException event
     */
    private void processGetStatusRequest(MessageContext mc,
                                         ResponseMessageBuilder messageBuilder)
            throws AxisFault, EventException {
        Subscription subscription =
                SubscriptionMessageBuilder.createGetStatusMessage(mc);
        if (log.isDebugEnabled()) {
            log.debug("GetStatus request recived for SynapseSubscription ID : " +
                    subscription.getId());
        }
        subscription = subscriptionManager.getSubscription(subscription.getId());
        if (subscription != null) {
            if (log.isDebugEnabled()) {
                log.debug("Sending GetStatus responce for SynapseSubscription ID : " +
                        subscription.getId());
            }
            //send the responce
            SOAPEnvelope soapEnvelope = messageBuilder.genGetStatusResponse(subscription);
            dispatchResponse(soapEnvelope, EventingConstants.WSE_GET_STATUS_RESPONSE,
                    mc, false);
View Full Code Here


    public SynapseSubscription() {
        this.setId(UIDGenerator.generateURNString());
        this.setDeliveryMode(EventingConstants.WSE_DEFAULT_DELIVERY_MODE);
        SubscriptionData subscriptionData = new SubscriptionData();
        subscriptionData.setProperty(SynapseEventingConstants.STATIC_ENTRY, "false");
        this.setSubscriptionData(subscriptionData);
    }
View Full Code Here

TOP

Related Classes of org.wso2.carbon.messagebox.admin.internal.exception.MessageBoxAdminException

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.