⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rmijmssessionstub.java

📁 实现了Jms的服务器源码,支持多种适配器,DB,FTP,支持多种数据库
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
        try {
            _delegate.deleteSender(clientId);
        } catch (RemoteException exception) {
            // rethrow as a JMSException
            throw new JMSException("Failed to deleteSender  " + exception);
        }
    }

    // implementation of JmsSessionStubIfc.deleteBrowser
    public void deleteBrowser(long clientId) throws JMSException {
        try {
            _delegate.deleteBrowser(clientId);
        } catch (RemoteException exception) {
            // rethrow as a JMSException
            throw new JMSException("Failed to deleteBrowser  " + exception);
        }
    }

    // implementation of JmsSessionStubIfc.createSubscriber
    public void createSubscriber(JmsTopic topic, String name, long clientId,
                                 String selector, boolean noLocal) throws JMSException {
        try {
            _delegate.createSubscriber(topic, name, clientId, selector,
                noLocal);
        } catch (RemoteException exception) {
            // rethrow as a JMSException
            throw new JMSException("Failed to createSubscriber  " + exception);
        }
    }

    // implementation of JmsSessionStubIfc.createPublisher
    public void createPublisher(JmsTopic topic) throws JMSException {
        try {
            _delegate.createPublisher(topic);
        } catch (RemoteException exception) {
            // rethrow as a JMSException
            throw new JMSException("Failed to createPublisher  " + exception);
        }
    }

    // implementation of JmsSessionStubIfc.deleteSubscriber
    public void deleteSubscriber(long clientId) throws JMSException {
        try {
            _delegate.deleteSubscriber(clientId);
        } catch (RemoteException exception) {
            // rethrow as a JMSException
            throw new JMSException("Failed to deleteSubscriber  " + exception);
        }
    }

    // implementation of JmsSessionStubIfc.deletePublisher
    public void deletePublisher(JmsTopic topic) throws JMSException {
        try {
            _delegate.deletePublisher(topic);
        } catch (RemoteException exception) {
            // rethrow as a JMSException
            throw new JMSException("Failed to deletePublisher  " + exception);
        }
    }

    // implementation of JmsSessionStubIfc.unsubscribe
    public void unsubscribe(String name) throws JMSException {
        try {
            _delegate.unsubscribe(name);
        } catch (RemoteException exception) {
            // rethrow as a JMSException
            throw new JMSException("Failed to unsubscribe  " + exception);
        }
    }

    // implementation of JmsSessionStubIfc.stopMessageDelivery
    public void stopMessageDelivery() throws JMSException {
        try {
            _delegate.stopMessageDelivery();
        } catch (RemoteException exception) {
            // rethrow as a JMSException
            throw new JMSException("Failed to stopMessageDelivery  " +
                exception);
        }
    }

    // implementation of JmsSessionStubIfc.startMessageDelivery
    public void startMessageDelivery() throws JMSException {
        try {
            _delegate.startMessageDelivery();
        } catch (RemoteException exception) {
            // rethrow as a JMSException
            throw new JMSException("Failed to startMessageDelivery  " +
                exception);
        }
    }

    // implementation of JmsSessionStubIfc.setMessageListener
    public void setMessageListener(JmsMessageListener listener) {
        _listener = listener;
    }

    // implementation of JmsSessionStubIfc.enableAsynchronousDelivery
    public void enableAsynchronousDelivery(long clientId, String id,
                                           boolean enable)
        throws JMSException {
        try {
            _delegate.enableAsynchronousDelivery(clientId, id, enable);
        } catch (RemoteException exception) {
            // rethrow as a JMSException
            throw new JMSException("Failed to enableAsynchronousDelivery  " +
                exception);
        }
    }

    // implementation of JmsSessionStubIfc.recover
    public void recover() throws JMSException {
        try {
            _delegate.recover();
        } catch (RemoteException exception) {
            // rethrow as a JMSException
            throw new JMSException("Failed to recover session " +
                exception);
        }
    }

    // implementation of JmsSessionStubIfc.commit
    public void commit() throws JMSException {
        try {
            _delegate.commit();
        } catch (RemoteException exception) {
            // rethrow as a JMSException
            throw new JMSException("Failed to commit session " +
                exception);
        }
    }

    // implementation of JmsSessionStubIfc.rollback
    public void rollback() throws JMSException {
        try {
            _delegate.rollback();
        } catch (RemoteException exception) {
            // rethrow as a JMSException
            throw new JMSException("Failed to rollback session " +
                exception);
        }
    }

    // implementation of JmsSessionStubIfc.commit
    public void commit(Xid xid, boolean onePhase) throws XAException {
        try {
            _delegate.commit(xid, onePhase);
        } catch (RemoteException exception) {
            // rethrow as a XAException
            throw new XAException("Failed to commit session " +
                exception);
        }
    }

    // implementation of JmsSessionStubIfc.end
    public void end(Xid xid, int flags) throws XAException {
        try {
            _delegate.end(xid, flags);
        } catch (RemoteException exception) {
            // rethrow as a XAException
            throw new XAException("Failed to end session " +
                exception);
        }
    }

    // implementation of JmsSessionStubIfc.forget
    public void forget(Xid xid) throws XAException {
        try {
            _delegate.forget(xid);
        } catch (RemoteException exception) {
            // rethrow as a XAException
            throw new XAException("Failed to forget session " +
                exception);
        }
    }

    // implementation of JmsSessionStubIfc.getResourceManagerId
    public String getResourceManagerId() throws XAException {
        try {
            return _delegate.getResourceManagerId();
        } catch (RemoteException exception) {
            // rethrow as a XAException
            throw new XAException("Failed to getResourceManagerId " +
                exception);
        }
    }

    // implementation of JmsSessionStubIfc.getTransactionTimeout
    public int getTransactionTimeout() throws XAException {
        try {
            return _delegate.getTransactionTimeout();
        } catch (RemoteException exception) {
            // rethrow as a XAException
            throw new XAException("Failed to getTransactionTimeout " +
                exception);
        }
    }

    // implementation of JmsSessionStubIfc.prepare
    public int prepare(Xid xid) throws XAException {
        try {
            return _delegate.prepare(xid);
        } catch (RemoteException exception) {
            // rethrow as a XAException
            throw new XAException("Failed to prepare session " +
                exception);
        }
    }

    // implementation of JmsSessionStubIfc.recover
    public Xid[] recover(int flag) throws XAException {
        try {
            return _delegate.recover(flag);
        } catch (RemoteException exception) {
            // rethrow as a XAException
            throw new XAException("Failed to recover session " +
                exception);
        }
    }

    // implementation of JmsSessionStubIfc.rollback
    public void rollback(Xid xid) throws XAException {
        try {
            _delegate.rollback(xid);
        } catch (RemoteException exception) {
            // rethrow as a XAException
            throw new XAException("Failed to rollback session " +
                exception);
        }
    }

    // implementation of JmsSessionStubIfc.setTransactionTimeout
    public boolean setTransactionTimeout(int seconds) throws XAException {
        try {
            return _delegate.setTransactionTimeout(seconds);
        } catch (RemoteException exception) {
            // rethrow as a XAException
            throw new XAException("Failed to setTransactionTimeout " +
                exception);
        }
    }

    // implementation of JmsSessionStubIfc.start
    public void start(Xid xid, int flags) throws XAException {
        try {
            _delegate.start(xid, flags);
        } catch (RemoteException exception) {
            // rethrow as a XAException
            throw new XAException("Failed to start session " +
                exception);
        }
    }

    // implementation of RmiJmsMessageListenerIfc.onMessages
    public void onMessage(Message message) throws RemoteException {
        // do not process if the message is null. This is also used by the
        // server to determine whether the client is still active.
        if (message == null) {
            return;
        }

        _listener.onMessage(message);
    }

    // implementation of RmiJmsMessageListenerIfc.onMessages
    public void onMessages(Vector messages) throws RemoteException {
        _listener.onMessages(messages);
    }

    // implementation of RmiJmsMessageListenerIfc.onMessageAvailable
    public void onMessageAvailable(long clientId) throws RemoteException {
        _listener.onMessageAvailable(clientId);
    }

} //-- RmiJmsSessionStub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -