public class Cleanup extends MQConnectionFactory implements java.lang.Runnable
MQConnectionFactory.ConnectionFactoryProperty| Constructor and Description |
|---|
Cleanup()
Default constructor.
|
Cleanup(MQConnectionFactory mqcf)
Constructor that imports property values.
|
| Modifier and Type | Method and Description |
|---|---|
void |
cleanup(boolean runAtRegularIntervals)
Perform cleanup of unwanted messages for non-durable subscribers who are no
longer active.
|
long |
getCleanupInterval()
Gets the cleanup interval.
|
int |
getCleanupLevel()
Gets the cleanup level.
|
javax.jms.ExceptionListener |
getExceptionListener()
Gets the ExceptionListener.
|
boolean |
isRunning()
Indicates whether
run() is currently active. |
static void |
main(java.lang.String[] args)
Invokes the utility directly from a command line.
|
void |
run()
Runs Cleanup.
|
void |
setCleanupInterval(long interval)
Sets the cleanup interval.
|
void |
setCleanupLevel(int level)
Sets the cleanup level.
|
void |
setExceptionListener(javax.jms.ExceptionListener el)
Sets the ExceptionListener.
|
void |
setPrintWriter(java.io.PrintWriter pw)
Sets the Print Writer.
|
void |
stop()
Stops any running cleanup thread.
|
createConnection, createConnection, getAppName, getAsyncExceptions, getBrokerCCSubQueue, getBrokerControlQueue, getBrokerPubQueue, getBrokerQueueManager, getBrokerSubQueue, getBrokerVersion, getCCDTURL, getCCSID, getChannel, getClientId, getClientID, getClientReconnectOptions, getClientReconnectTimeout, getConnectionNameList, getConnTag, getDescription, getDirectAuth, getFailIfQuiesce, getHdrCompList, getHostName, getLocalAddress, getMapNameStyle, getMaxBufferSize, getMessageRetention, getMessageSelection, getMQConnectionOptions, getMsgBatchSize, getMsgCompList, getMulticast, getPollingInterval, getPort, getProviderVersion, getProxyHostName, getProxyPort, getPubAckInterval, getQueueManager, getReceiveExit, getReceiveExitInit, getReference, getRescanInterval, getSecurityExit, getSecurityExitInit, getSendCheckCount, getSendExit, getSendExitInit, getShareConvAllowed, getSparseSubscriptions, getSSLCertStores, getSSLCertStoresAsString, getSSLCipherSuite, getSSLFipsRequired, getSSLPeerName, getSSLResetCount, getSSLSocketFactory, getStatusRefreshInterval, getSubscriptionStore, getSyncpointAllGets, getTargetClientMatching, getTemporaryModel, getTempQPrefix, getTempTopicPrefix, getTransportType, getUseConnectionPooling, getVersion, getWildcardFormat, setAppName, setAsyncExceptions, setBrokerCCSubQueue, setBrokerControlQueue, setBrokerPubQueue, setBrokerQueueManager, setBrokerSubQueue, setBrokerVersion, setCCDTURL, setCCSID, setChannel, setClientId, setClientID, setClientReconnectOptions, setClientReconnectTimeout, setConnectionNameList, setConnTag, setDescription, setDirectAuth, setFailIfQuiesce, setHdrCompList, setHostName, setLocalAddress, setMapNameStyle, setMaxBufferSize, setMessageRetention, setMessageSelection, setMQConnectionOptions, setMsgBatchSize, setMsgCompList, setMulticast, setPollingInterval, setPort, setProviderVersion, setProxyHostName, setProxyPort, setPubAckInterval, setQueueManager, setReceiveExit, setReceiveExitInit, setRescanInterval, setSecurityExit, setSecurityExitInit, setSendCheckCount, setSendExit, setSendExitInit, setShareConvAllowed, setSparseSubscriptions, setSSLCertStores, setSSLCertStores, setSSLCipherSuite, setSSLFipsRequired, setSSLPeerName, setSSLResetCount, setSSLSocketFactory, setStatusRefreshInterval, setSubscriptionStore, setSyncpointAllGets, setTargetClientMatching, setTemporaryModel, setTempQPrefix, setTempTopicPrefix, setTransportType, setUseConnectionPooling, setWildcardFormatcreateContext, createContext, createContext, createContext, equals, hashCodeclear, containsKey, containsValue, entrySet, get, getObjectProperty, isEmpty, keySet, propertyExists, put, putAll, remove, setBatchProperties, setBooleanProperty, setByteProperty, setBytesProperty, setCharProperty, setDoubleProperty, setFloatProperty, setIntProperty, setLongProperty, setObjectProperty, setProviderPropertyContext, setShortProperty, setStringProperty, size, valuesdump, getBooleanProperty, getByteProperty, getBytesProperty, getCharProperty, getDoubleProperty, getFloatProperty, getIntProperty, getLongProperty, getPropertyNames, getShortProperty, getStringProperty, toStringsetBatchProperties, setBooleanProperty, setByteProperty, setBytesProperty, setCharProperty, setDoubleProperty, setFloatProperty, setIntProperty, setLongProperty, setObjectProperty, setShortProperty, setStringPropertygetBooleanProperty, getByteProperty, getBytesProperty, getCharProperty, getDoubleProperty, getFloatProperty, getIntProperty, getLongProperty, getObjectProperty, getPropertyNames, getShortProperty, getStringProperty, propertyExistspublic Cleanup()
public Cleanup(MQConnectionFactory mqcf) throws javax.jms.JMSException
mqcf - the topic connection factory that provides the values.javax.jms.JMSExceptionpublic void setCleanupInterval(long interval)
throws javax.jms.JMSException
setCleanupInterval in class MQConnectionFactoryinterval - the cleanup interval in milliseconds.javax.jms.JMSException - if interval is either null or invalid.public long getCleanupInterval()
getCleanupInterval in class MQConnectionFactorypublic void setCleanupLevel(int level)
throws javax.jms.JMSException
setCleanupLevel in class MQConnectionFactorylevel - the cleanup level. The following values are accepted:
javax.jms.JMSException - if level is not supported or if an illegal state is encountered.public int getCleanupLevel()
getCleanupLevel in class MQConnectionFactorysetCleanupLevel(int level)public static void main(java.lang.String[] args)
throws java.io.UnsupportedEncodingException
Cleanup [-m
Syntax for client attach:
Cleanup -client [-m
setCleanupLevel.
args - the input argumentsjava.io.UnsupportedEncodingExceptionpublic void run()
setCleanupLevel() and
setCleanupInterval(long). If the field set by
setCleanupInterval(long) is zero, Cleanup runs once and returns. Otherwise Cleanup runs
regularly at the time in milliseconds set by
setCleanupInterval(long). CleanupInterval must be zero with
WMQConstants.WMQ_CLEANUP_FORCE or
WMQConstants.WMQ_CLEANUP_NONDUR set, and CleanupLevel cannot be
WMQConstants.WMQ_CLEANUP_NONE. In these cases the method fails
with an IllegalStateException. Any exceptions generated are
routed to the ExceptionListener.run in interface java.lang.Runnablepublic void stop()
public void setExceptionListener(javax.jms.ExceptionListener el)
run() is running. Cleanup terminates shortly after issuing the exception to the
ExceptionListener.
To remove an ExceptionListener, call this method passing in a null valueel - the exception listener.public javax.jms.ExceptionListener getExceptionListener()
public void setPrintWriter(java.io.PrintWriter pw)
pw - the PrintWriter.public boolean isRunning()
run() is currently active.true if active; false otherwise.public void cleanup(boolean runAtRegularIntervals)
throws javax.jms.JMSException
runAtRegularIntervals - - whether repeating cleanup operations should be run
at regular intervals.javax.jms.JMSException - if the operation fails