📄 rmijmsserversession.java
字号:
* Delete the sender for the specified queue. If the sender does not
* exist or the sender cannot be deleted then throw JMSException
*
* @param clientId identity of client to delete
* @exception JMSException.
* @exception RemoteException
*/
public synchronized void deleteSender(long clientId)
throws JMSException, RemoteException {
_delegate.deleteSender(clientId);
}
/**
* Delete the queue browser associated with the specified queue from
* the session.
* If the corresponding queue does not exist or it cannot be deleted,
* then throw a JMSException.
*
* @param clientId the identity of the client
* @exception JMSException
*/
public synchronized void deleteBrowser(long clientId)
throws JMSException {
_delegate.deleteBrowser(clientId);
}
/**
* Create a subscriber endpoint for this session. A subscriber is a message
* consumer specific to the topic message model. The subscriber is
* associated with a topic. The consumer name must be specfied for
* persistent delivery but can be null otherwise
* <p>
* You cannot create more than one subscriber for the same destination
*
* @param topic subscriber destination
* @param name name of the cnsumer; can be null
* @param clientId the session allocated identifier of
* this consumer
* @param selector the selector to filter messages.
* This may be null.
* @param noLocal inhibit consuming messages on same
* connection.
* @return the unique consumer identifier
* @exception JMSException
* @exception RemoteException
*/
public synchronized void createSubscriber(JmsTopic topic, String name, long clientId,
String selector, boolean noLocal)
throws JMSException, RemoteException {
_delegate.createSubscriber(topic, name, clientId, selector, noLocal);
}
/**
* Create a publisher endpoint for this session. A publisher is a message
* publisher specific to the topic message model. The publisher is
* associated with a topic.
* <p>
* You cannot create more than one publisher for the same destination
*
* @param topic receiver destination
* @exception JMSException.
* @exception RemoteException
*/
public synchronized void createPublisher(JmsTopic topic)
throws JMSException, RemoteException {
_delegate.createPublisher(topic);
}
/**
* Delete the subscriber for the specified topic. If this subscriber
* does not exist or the cannot be deleted then throw JMSException.
*
* @param clientId the identity of the client
* @exception JMSException.
*/
public synchronized void deleteSubscriber(long clientId)
throws JMSException, RemoteException {
_delegate.deleteSubscriber(clientId);
}
/**
* Delete the publisher for the specified topic. If the publisher does
* not exist or cannot be deleted then throw JMSException
*
* @param topic topic object
* @exception JMSException.
* @exception RemoteException.
*/
public synchronized void deletePublisher(JmsTopic topic)
throws JMSException, RemoteException {
_delegate.deletePublisher(topic);
}
/**
* Unsubscribe a durable subscription
*
* @param name the name used to identify the
* subscription
* @exception JMSException if the subscription cannot be removed
*/
public synchronized void unsubscribe(String name)
throws JMSException {
_delegate.unsubscribe(name);
}
/**
* Stop message delivery to this session. If there are any problems
* completing the request then throw the JMSException exception
*
* @exception JMSException
* @exception RemoteException.
*/
public synchronized void stopMessageDelivery()
throws JMSException, RemoteException {
_delegate.stopMessageDelivery();
}
/**
* Start message delivery to this session. If there are any problems
* completing this request then throw the JMSException exception
*
* @exception JMSException
* @exception RemoteException.
*/
public synchronized void startMessageDelivery()
throws JMSException, RemoteException {
_delegate.startMessageDelivery();
}
/**
* Recover the session
*
* @exception JMSException
* @exception RemoteException.
*/
public synchronized void recover()
throws JMSException, RemoteException {
_delegate.recover();
}
/**
* Commit the session
*
* @exception JMSException
* @exception RemoteException.
*/
public synchronized void commit()
throws JMSException, RemoteException {
_delegate.commit();
}
/**
* Rollback the session
*
* @exception JMSException
* @exception RemoteException.
*/
public synchronized void rollback()
throws JMSException, RemoteException {
_delegate.rollback();
}
// implementation of RmiJmsServerSessionIfc.commit
public void commit(Xid xid, boolean onePhase)
throws XAException, RemoteException {
_delegate.commit(xid, onePhase);
}
// implementation of RmiJmsServerSessionIfc.end
public void end(Xid xid, int flags)
throws XAException, RemoteException {
_delegate.end(xid, flags);
}
// implementation of RmiJmsServerSessionIfc.forget
public void forget(Xid xid)
throws XAException, RemoteException {
_delegate.forget(xid);
}
// implementation of RmiJmsServerSessionIfc.getTransactionTimeout
public int getTransactionTimeout()
throws XAException, RemoteException {
return _delegate.getTransactionTimeout();
}
// implementation of RmiJmsServerSessionIfc.prepare
public int prepare(Xid xid)
throws XAException, RemoteException {
return _delegate.prepare(xid);
}
// implementation of RmiJmsServerSessionIfc.recover
public Xid[] recover(int flag)
throws XAException, RemoteException {
return _delegate.recover(flag);
}
// implementation of RmiJmsServerSessionIfc.rollback
public void rollback(Xid xid)
throws XAException, RemoteException {
_delegate.rollback(xid);
}
// implementation of RmiJmsServerSessionIfc.setTransactionTimeout
public boolean setTransactionTimeout(int seconds)
throws XAException, RemoteException {
return _delegate.setTransactionTimeout(seconds);
}
// implementation of RmiJmsServerSessionIfc.start
public void start(Xid xid, int flags)
throws XAException, RemoteException {
_delegate.start(xid, flags);
}
// implementation of RmiJmsServerSessionIfc.getResourceManageRId
public String getResourceManagerId() throws XAException, RemoteException {
return _delegate.getResourceManagerId();
}
/**
* All server side sessions register with the consumer manager for
* message consumption (i.e push-model). When a message arrives this
* server-side instance will send it down to the client side stub for
* further processing.
* <p>
* If the listener is null then throw JMSException
*
* @param listener listener to delivery messages too.
* @exception JMSException
* @exception RemoteException.
*/
public synchronized void setMessageListener(RemoteJmsMessageListenerIfc listener)
throws JMSException, RemoteException {
_listener = listener;
_delegate.setMessageListener(this);
}
/**
* Enable or disable asynchronous message delivery for a particular
* consumer
*
* @param clientId - the id of the client to check
* @param id - the last message asynchronously delivered to consumer
* @param enable - true to enable; false to disable
*/
public void enableAsynchronousDelivery(long clientId, String id,
boolean enable)
throws JMSException, RemoteException {
_delegate.enableAsynchronousDelivery(clientId, id, enable);
}
// implementation of MessageListener.onMessage
// throws unchecked exception ClientDisconnectionException
public void onMessage(Message message) {
if (_listener != null) {
try {
_listener.onMessage(message);
} catch (RemoteException exception) {
// rethrow
throw new ClientDisconnectionException("Failed in onMessage " +
exception);
}
} else {
// throw a ClientDisconnectException
throw new ClientDisconnectionException(
"No listener registered for this session");
}
}
// implementation of MessageListener.onMessage
// throws unchecked exception ClientDisconnectionException
public void onMessages(Vector messages) {
if (_listener != null) {
try {
_listener.onMessages(messages);
} catch (RemoteException exception) {
exception.printStackTrace();
// rethrow
throw new ClientDisconnectionException("Failed in onMessages " +
exception);
}
} else {
// throw a ClientDisconnectException
throw new ClientDisconnectionException(
"No listener registered for this session");
}
}
// implementation of MessageListener.onMessage
// throws unchecked exception ClientDisconnectionException
public void onMessageAvailable(long clientId) {
if (_listener != null) {
try {
_listener.onMessageAvailable(clientId);
} catch (RemoteException exception) {
// rethrow
throw new ClientDisconnectionException("Failed in onMessageAvailable " +
exception);
}
} else {
// throw a ClientDisconnectException
throw new ClientDisconnectionException(
"No listener registered for this session");
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -