Fields Summary |
---|
private static final Logger | logThe log |
private javax.resource.spi.ResourceAdapter | raThe resource adapter |
private String | destinationThe destination |
private boolean | isTopicThe destination type |
private String | messageSelectorThe message selector |
private int | acknowledgeModeThe acknowledgement mode |
private boolean | subscriptionDurabilityThe subscription durability |
private String | clientIdThe client id |
private String | subscriptionNameThe subscription name |
private long | reconnectIntervalThe reconnect interval in seconds |
private String | providerAdapterJNDIThe jms provider adapter jndi name |
private String | userThe user |
private String | passThe password |
private int | maxMessagesThe maximum number of messages |
private int | minSessionThe minimum number of sessions |
private int | maxSessionThe maximum number of sessions |
private long | keepAliveThe keep alive time for sessions |
private boolean | sessionTransactedIs the session transacted |
private String | dLQHandlerThe DLQ handler class |
private boolean | useDLQWhether to use a DLQ |
private String | dLQJNDINameThe DLQ jndi binding |
private String | dLQUserThe DLQ user |
private String | dLQPasswordThe DLQ password |
private String | dLQClientIDThe DLQ client id |
private int | dLQMaxResentThe DLQ max resent |
private boolean | redeliverUnspecified |
private int | transactionTimeout |
private Boolean | isSameRMOverrideValue |
Methods Summary |
---|
public java.lang.String | getAcknowledgeMode()
if (sessionTransacted)
return "TRANSACTED";
else if (Session.DUPS_OK_ACKNOWLEDGE == acknowledgeMode)
return "DUPS_OK_ACKNOWLEDGE";
else
return "AUTO_ACKNOWLEDGE";
|
public int | getAcknowledgeModeInt()
if (sessionTransacted)
return Session.SESSION_TRANSACTED;
return acknowledgeMode;
|
public java.lang.String | getClientId()
return clientId;
|
public java.lang.String | getDLQClientID()
return dLQClientID;
|
public java.lang.String | getDLQHandler()
return dLQHandler;
|
public java.lang.String | getDLQJNDIName()
return dLQJNDIName;
|
public int | getDLQMaxResent()
return dLQMaxResent;
|
public java.lang.String | getDLQPassword()
return dLQPassword;
|
public java.lang.String | getDLQUser()
return dLQUser;
|
public java.lang.String | getDestination()
return destination;
|
public java.lang.String | getDestinationType()
if (isTopic)
return Topic.class.getName();
else
return Queue.class.getName();
|
public java.lang.Boolean | getIsSameRMOverrideValue()
return isSameRMOverrideValue;
|
public long | getKeepAlive()
return keepAlive;
|
public long | getKeepAliveLong()
return keepAlive;
|
public int | getMaxMessages()
return maxMessages;
|
public int | getMaxMessagesInt()
return maxMessages;
|
public int | getMaxSession()
return maxSession;
|
public int | getMaxSessionInt()
return maxSession;
|
public java.lang.String | getMessageSelector()
return messageSelector;
|
public int | getMinSession()
return minSession;
|
public int | getMinSessionInt()
return minSession;
|
public java.lang.String | getPassword()
return pass;
|
public java.lang.String | getProviderAdapterJNDI()
return providerAdapterJNDI;
|
public long | getReconnectInterval()
return reconnectInterval;
|
public long | getReconnectIntervalLong()
return reconnectInterval * 1000;
|
public boolean | getRedeliverUnspecified()
return redeliverUnspecified;
|
public javax.resource.spi.ResourceAdapter | getResourceAdapter()
return ra;
|
public boolean | getSessionTransacted()
return sessionTransacted;
|
public java.lang.String | getSubscriptionDurability()
if (subscriptionDurability)
return "Durable";
else
return "NonDurable";
|
public java.lang.String | getSubscriptionName()
return subscriptionName;
|
public int | getTransactionTimeout()
return transactionTimeout;
|
public boolean | getUseDLQ()
return useDLQ;
|
public java.lang.String | getUser()
return user;
|
public boolean | isDurable()
return subscriptionDurability;
|
public boolean | isSessionTransacted()
return sessionTransacted;
|
public boolean | isTopic()
return isTopic;
|
public boolean | isUseDLQ()Whether we should use a DLQ
return useDLQ;
|
public void | setAcknowledgeMode(java.lang.String acknowledgeMode)
if ("DUPS_OK_ACKNOWLEDGE".equals(acknowledgeMode))
this.acknowledgeMode = Session.DUPS_OK_ACKNOWLEDGE;
else if ("AUTO_ACKNOWLEDGE".equals(acknowledgeMode))
this.acknowledgeMode = Session.AUTO_ACKNOWLEDGE;
else if ("SESSION_TRANSACTED".equals(acknowledgeMode))
this.acknowledgeMode = Session.SESSION_TRANSACTED;
else
throw new IllegalArgumentException("Unsupported acknowledgement mode " + acknowledgeMode);
|
public void | setClientId(java.lang.String clientId)
this.clientId = clientId;
|
public void | setDLQClientID(java.lang.String clientID)
dLQClientID = clientID;
|
public void | setDLQHandler(java.lang.String handler)
this.dLQHandler = handler;
|
public void | setDLQJNDIName(java.lang.String name)
dLQJNDIName = name;
|
public void | setDLQMaxResent(int maxResent)
this.dLQMaxResent = maxResent;
|
public void | setDLQPassword(java.lang.String password)
dLQPassword = password;
|
public void | setDLQUser(java.lang.String user)
dLQUser = user;
|
public void | setDestination(java.lang.String destination)
this.destination = destination;
|
public void | setDestinationType(java.lang.String destinationType)
if (Topic.class.getName().equals(destinationType))
this.isTopic = true;
else
this.isTopic = false;
|
public void | setIsSameRMOverrideValue(java.lang.Boolean isSameRMOverrideValue)
this.isSameRMOverrideValue = isSameRMOverrideValue;
|
public void | setKeepAlive(long keepAlive)
this.keepAlive = keepAlive;
|
public void | setMaxMessages(int maxMessages)
this.maxSession = maxMessages;
|
public void | setMaxSession(int maxSession)
this.maxSession = maxSession;
|
public void | setMessageSelector(java.lang.String messageSelector)
this.messageSelector = messageSelector;
|
public void | setMinSession(int minSession)
this.minSession = minSession;
|
public void | setPassword(java.lang.String pass)
this.pass = pass;
|
public void | setProviderAdapterJNDI(java.lang.String providerAdapterJNDI)
this.providerAdapterJNDI = providerAdapterJNDI;
|
public void | setReconnectInterval(long reconnectInterval)
this.reconnectInterval = reconnectInterval;
|
public void | setRedeliverUnspecified(boolean redeliverUnspecified)
this.redeliverUnspecified = redeliverUnspecified;
|
public void | setResourceAdapter(javax.resource.spi.ResourceAdapter ra)
this.ra = ra;
|
public void | setSessionTransacted(boolean sessionTransacted)
this.sessionTransacted = sessionTransacted;
|
public void | setSubscriptionDurability(java.lang.String subscriptionDurability)
this.subscriptionDurability = "Durable".equals(subscriptionDurability);
|
public void | setSubscriptionName(java.lang.String subscriptionName)
this.subscriptionName = subscriptionName;
|
public void | setTransactionTimeout(int transactionTimeout)
this.transactionTimeout = transactionTimeout;
|
public void | setUseDLQ(boolean useDLQ)
this.useDLQ = useDLQ;
|
public void | setUser(java.lang.String user)
this.user = user;
|
public java.lang.String | toString()
StringBuffer buffer = new StringBuffer();
buffer.append(Strings.defaultToString(this)).append('(");
buffer.append("ra=").append(ra);
buffer.append(" destination=").append(destination);
buffer.append(" isTopic=").append(isTopic);
if (messageSelector != null)
buffer.append(" selector=").append(messageSelector);
buffer.append(" tx=").append(sessionTransacted);
if (sessionTransacted == false)
buffer.append(" ack=").append(getAcknowledgeMode());
buffer.append(" durable=").append(subscriptionDurability);
if (clientId != null)
buffer.append(" clientID=").append(clientId);
if (subscriptionName != null)
buffer.append(" subscription=").append(subscriptionName);
buffer.append(" reconnect=").append(reconnectInterval);
buffer.append(" provider=").append(providerAdapterJNDI);
buffer.append(" user=").append(user);
if (pass != null)
buffer.append(" pass=").append("<not shown>");
buffer.append(" maxMessages=").append(maxMessages);
buffer.append(" minSession=").append(minSession);
buffer.append(" maxSession=").append(maxSession);
buffer.append(" keepAlive=").append(keepAlive);
buffer.append(" useDLQ=").append(useDLQ);
if (useDLQ)
{
buffer.append(" DLQHandler=").append(dLQHandler);
buffer.append(" DLQJndiName=").append(dLQJNDIName);
buffer.append(" DLQUser=").append(dLQUser);
if (dLQPassword != null)
buffer.append(" DLQPass=").append("<not shown>");
if (dLQClientID != null)
buffer.append(" DLQClientID=").append(dLQClientID);
buffer.append(" DLQMaxResent=").append(dLQMaxResent);
}
buffer.append(')");
return buffer.toString();
|
public void | validate()
if (log.isTraceEnabled())
log.trace("validate " + this);
// TODO validate
|