Examples of XcpResponse


Examples of org.mom4j.xcp.XcpResponse

                                            XcpMessage.ACTION_REGISTER_DUR,
                                            dest.getName(),
                                            consumerId);
        message.setMessageSelector(messageSelector);
        message.setSubscriberName(name + "@" + ID_SUFFIX);
        XcpResponse resp = null;
        try {
            resp = this.sender.send(message, new XcpMessageHandler());
        } catch(java.io.IOException ex) {
            JMSException jmsx = new JMSException(ex.getMessage());
            jmsx.setLinkedException(ex);
            throw jmsx;
        }
        XcpMessage msg = (XcpMessage)resp.getRootElement();

        return msg.getConsumerId();
    }
View Full Code Here

Examples of org.mom4j.xcp.XcpResponse

        }
        XcpMessage message = new XcpMessage(sid,
                                            action,
                                            destinationName,
                                            consumerId);
        XcpResponse resp = null;
        try {
            resp = this.sender.send(message, new XcpMessageHandler());
        } catch(java.io.IOException ex) {
            JMSException jmsx = new JMSException(ex.getMessage());
            jmsx.setLinkedException(ex);
            throw jmsx;
        }
        message = (XcpMessage)resp.getRootElement();
       
        return message.getMessage();
    }
View Full Code Here

Examples of org.mom4j.xcp.XcpResponse

   
    public Context createSubcontext(String name)
        throws NamingException
    {
        XcpBinding b = new XcpBinding(this.path, name, XcpBinding.ACTION_CREATE_CTX);
        XcpResponse resp = null;
        try {
            resp = this.sender.send(b, this.handler);
        } catch(java.io.IOException ex) {
            NamingException nex = new NamingException(ex.getMessage());
            nex.setRootCause(ex);
            throw nex;
        }
        String newPath = (String) ((XcpBinding)resp.getRootElement()).getValue();
        if(newPath == null) {
            throw new javax.naming.NamingException(name + " already exists");
        }
        return new ContextImpl(newPath, this.environment);
    }
View Full Code Here

Examples of org.mom4j.xcp.XcpResponse

        throws NamingException
    {
        this.assertNotNull("name", name);
       
        XcpBinding b = new XcpBinding(this.path, name.toString(), XcpBinding.ACTION_LIST);
        XcpResponse resp = null;
        try {
            resp = this.sender.send(b, this.handler);
        } catch(java.io.IOException ex) {
            NamingException nex = new NamingException(ex.getMessage());
            nex.setRootCause(ex);
            throw nex;
        }
        Map map = (Map)((XcpBinding)resp.getRootElement()).getValue();
        return new NamingEnumerationImpl(map);
    }
View Full Code Here

Examples of org.mom4j.xcp.XcpResponse

        throws NamingException
    {
        this.assertNotNull("name", name);
       
        XcpBinding b = new XcpBinding(this.path, name.toString(), XcpBinding.ACTION_LOOKUP);
        XcpResponse resp = null;
        try {
            resp = this.sender.send(b, this.handler);
        } catch(java.io.IOException ex) {
            NamingException nex = new NamingException(ex.getMessage());
            nex.setRootCause(ex);
            throw nex;
        }
        Object obj = ((XcpBinding)resp.getRootElement()).getValue();
        if(obj == null) {
            throw new javax.naming.NameNotFoundException(name.toString());
        }
        if(obj instanceof CreateCtx) {
            return new ContextImpl(((CreateCtx)obj).getPath(), this.environment);
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.