Cleanup *
public class Cleanup
implements Runnable
WebSphere MQ class: Cleanup
Cleanup contains utilities for dealing with broken non-durable subscriptions using the SUBSTATE(BROKER) option. It is not applicable if you use a direct connection to WebSphere MQ Event Broker.
See also: ConnectionFactory.
WebSphere MQ constructor
- Cleanup
public Cleanup()
Default constructor.
- Cleanup
public Cleanup MQTopicConnectionFactory(mqtcf) throws JMSExceptionConstructor that copies property values from the supplied MQTopicConnectionFactory.
Methods
- cleanup
public void cleanup() throws JMSExceptionExecutes Cleanup once. If cleanupLevel is NONE, throws an IllegalStateException.
- getCCSID
public int getCCSID()Get the character set of the queue manager.
- getChannel
public String getChannel()For client only, get the channel that was used.
- getCleanupInterval
public long getCleanupInterval()Retrieve the cleanup interval.
- getCleanupLevel
public int getCleanupLevel()Retrieve the cleanup level.
- getExceptionListener
public ExceptionListener getExceptionListener()Return the ExceptionListener.
- getHostName
public String getHostName()Retrieve the name of the host.
- getPort
public int getPort()For client connections, get the port number.
- getQueueManager
public String getQueueManager()Get the name of the queue manager.
- getReceiveExit
public String getReceiveExit()Get the name of the receive exit class.
- getReceiveExitInit
public String getReceiveExitInit()Get the initialization string that was passed to the receive exit class.
- getSecurityExit
public String getSecurityExit()Get the name of the security exit class.
- getSecurityExitInit
public String getSecurityExitInit()Get the security exit initialization string.
- getSendExit
public String getSendExit()Get the name of the send exit class.
- getSendExitInit
public String getSendExitInit()Get the send exit initialization string.
- getTransportType
public int getTransportType()Retrieve the transport type.
- isRunning
public boolean isRunning()Return true if the run() method is currently active.
- main
public static void main(String args[]) throws java.io.UnsupportedEncodingExceptionInvoke the utility from a command line. For details of the invocation options and parameters, see Manual cleanup.
- run
public void run()Run this utility in the background at intervals, as determined by the cleanupLevel and cleanupInterval properties.
- setCCSID
public void setCCSID(int x) throws JMSExceptionSet the character set to be used when connecting to the queue manager. See Table 13 for a list of allowed values. We recommend that you use the default value (819) for most situations.
- setChannel
public void setChannel(String x) throws JMSExceptionFor client only, set the channel to use.
- setCleanupInterval
public void setCleanupInterval(long interval) throws JMSExceptionSet the cleanupInterval.
- Parameters:
- interval: length of time in milliseconds between runs of the cleanup utility
- Throws:
- JMSException if interval is less than 0
- setCleanupLevel
public void setCleanupLevel(int level) throws JMSExceptionSet the cleanup level to use. It can be one of
- JMSC.MQJMS_CLEANUP_NONE
- JMSC.MQJMS_CLEANUP_SAFE
- JMSC.MQJMS_CLEANUP_STRONG
- JMSC.MQJMS_CLEANUP_FORCE
- JMSC.MQJMS_CLEANUP_NONDUR
- setExceptionListener
public void setExceptionListener(ExceptionListener el)Set the ExceptionListener. If set, the ExceptionListener receives any exceptions caused during the run() method. Shortly after issuing the exception to the ExceptionListener, Cleanup terminates.
- setHostName
public void setHostName(String hostname)For client connections, the name of the host to connect to.
- setPort
public void setPort(int port) throws JMSExceptionSet the port for a client connection.
- Parameters:
- port: the new value to use.
- Throws:
- JMSException if the port is negative.
- setQueueManager
public void setQueueManager(String x) throws JMSExceptionSet the name of the queue manager to connect to.
- setReceiveExit
public void setReceiveExit(String receiveExit)The name of a class that implements a receive exit.
- setReceiveExitInit
public void setReceiveExitInit(String x)Initialization string that is passed to the constructor of the receive exit class.
- setSecurityExit
public void setSecurityExit(String securityExit)The name of a class that implements a security exit.
- setSecurityExitInit
public void setSecurityExitInit(String x)Initialization string that is passed to the security exit constructor.
- setSendExit
public void setSendExit(String sendExit)The name of a class that implements a send exit.
- setSendExitInit
public void setSendExitInit(String x)Initialization string that is passed to the constructor of send exit.
- setTransportType
public void setTransportType(int x) throws JMSExceptionSet the transport type to use. It can be one of:
- JMSC.MQJMS_TP_BINDINGS_MQ
- JMSC.MQJMS_TP_CLIENT_MQ_TCPIP
- stop
public void stop()Stop any currently running cleanup thread. Return when cleanup has finished. Do nothing if cleanup is not running.
WebSphere is a trademark of the IBM Corporation in the United States, other countries, or both.
IBM is a trademark of the IBM Corporation in the United States, other countries, or both.