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.
public Cleanup()
Default constructor.
public Cleanup(MQTopicConnectionFactory mqtcf) throws JMSException
Constructor which copies property values from the supplied MQTopicConnectionFactory.
public void cleanup() throws JMSException
This method executes Cleanup once. If cleanupLevel is NONE, it throws an IllegalStateException.
public int getCCSID()
Get the character set of the queue manager.
public String getChannel()
For client only, get the channel that was used.
public long getCleanupInterval()
Retrieve the cleanup interval.
public int getCleanupLevel()
Retrieve the cleanup level.
public ExceptionListener getExceptionListener()
Returns the ExceptionListener.
public String getHostName()
Retrieve the name of the host.
public int getPort()
For client connections, get the port number.
public String getQueueManager()
Get the name of the queue manager.
public String getReceiveExit()
Get the name of the receive exit class.
public String getReceiveExitInit()
Get the initialization string that was passed to the receive exit class.
public String getSecurityExit()
Get the name of the security exit class.
public String getSecurityExitInit()
Get the security exit inittialization string.
public String getSendExit()
Get the name of the send exit class.
public String getSendExitInit()
Get the send exit initialization string.
public int getTransportType()
Retrieve the transport type.
public boolean isRunning()
Returns true if the run() method is currently active.
public static void main(String args[]) throws java.io.UnsupportedEncodingException
Allows the utility to be invoked from a command line. For details of the invocation options and parameters, see Manual cleanup.
public void run()
Method to call to run this utility in the background at intervals, as determined by the cleanupLevel and cleanupInterval properties.
public void setCCSID(int x) throws JMSException
Set 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.
public void setChannel(String x) throws JMSException
For client only, set the channel to use.
public void setCleanupInterval(long interval) throws JMSException
Set the cleanupInterval.
public void setCleanupLevel(int level) throws JMSException
Set the cleanup level to use. It can be one of
public void setExceptionListener(ExceptionListener el)
Sets the ExceptionListener. If set, the ExceptionListener receives any exceptions caused during the run() method. Shortly after issuing the exception to the ExceptionListener, Cleanup terminates.
public void setHostName(String hostname)
For client connections, the name of the host to connect to.
public void setPort(int port) throws JMSException
Set the port for a client connection.
public void setQueueManager(String x) throws JMSException
Set the name of the queue manager to connect to.
public void setReceiveExit(String receiveExit)
The name of a class that implements a receive exit.
public void setReceiveExitInit(String x)
Initialization string that is passed to the constructor of the receive exit class.
public void setSecurityExit(String securityExit)
The name of a class that implements a security exit.
public void setSecurityExitInit(String x)
Initialization string that is passed to the security exit constructor.
public void setSendExit(String sendExit)
The name of a class that implements a send exit.
public void setSendExitInit(String x)
Initialization string that is passed to the constructor of send exit.
public void setTransportType(int x) throws JMSException
Set the transport type to use. It can be one of:
public void stop()
Stops any currently running cleanup thread. Returns when cleanup has finished. Does nothing if cleanup is not running.