de.knipp.rritoolkit.request
Class QueueDeleteRequest

java.lang.Object
  extended by de.knipp.rritoolkit.request.Request
      extended by de.knipp.rritoolkit.request.QueueDeleteRequest

public class QueueDeleteRequest
extends Request

implementation of the queue read request

Version:
$Revision: 14936 $
Author:
Klaus Malorny

Field Summary
private  java.lang.String messageID
          the message ID
private  Message.Type messageType
          the message type
 
Constructor Summary
QueueDeleteRequest()
          constructor
QueueDeleteRequest(java.lang.String id)
          constructor
QueueDeleteRequest(java.lang.String id, Message.Type type)
          constructor
 
Method Summary
 QueueDeleteResponse execute(Port port)
          execute the this request on the given port.
protected  java.lang.String getActionCode()
          return the action string for this request
 java.lang.String getMessageID()
          return the message ID
 Message.Type getMessageType()
          return the type of the message that shall be deleted
protected  void requestToKVList(KVList list)
          method that needs to be implemented by subclasses for the key-value list conversion
protected  void requestToXml(org.w3c.dom.Node node)
          method that needs to be implemented by subclasses for the XML conversion
 void setMessage(Message msg)
          take the type and ID from the given message
 void setMessageID(java.lang.String theMessageID)
          set the message ID
 void setMessageType(Message.Type type)
          set the message type of the message that shall be deleted.
 java.lang.String toString()
          return a string representation for debugging purposes
 
Methods inherited from class de.knipp.rritoolkit.request.Request
getClientTxnID, getProtocolVersion, setClientTxnID, toList, toXml
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

messageID

private java.lang.String messageID
the message ID


messageType

private Message.Type messageType
the message type

Constructor Detail

QueueDeleteRequest

public QueueDeleteRequest()
constructor


QueueDeleteRequest

public QueueDeleteRequest(java.lang.String id)
constructor

Parameters:
id - the message ID

QueueDeleteRequest

public QueueDeleteRequest(java.lang.String id,
                          Message.Type type)
constructor

Parameters:
id - the message ID
type - the type (may be null)
Method Detail

getMessageType

public Message.Type getMessageType()
return the type of the message that shall be deleted

Returns:
the type or null if the type is not set

setMessageType

public void setMessageType(Message.Type type)
set the message type of the message that shall be deleted. It is not required to specify the type, though.

Parameters:
type - the type or null if the type is unknown

getMessageID

public java.lang.String getMessageID()
return the message ID

Returns:
the message ID

setMessageID

public void setMessageID(java.lang.String theMessageID)
set the message ID

Parameters:
theMessageID - the message ID of the message

setMessage

public void setMessage(Message msg)
take the type and ID from the given message

Parameters:
msg - the message to be deleted

execute

public QueueDeleteResponse execute(Port port)
                            throws java.io.IOException
execute the this request on the given port.

Overrides:
execute in class Request
Parameters:
port - the port on which this request shall be executed
Returns:
the response
Throws:
java.io.IOException - if the execution failed

requestToXml

protected void requestToXml(org.w3c.dom.Node node)
                     throws org.w3c.dom.DOMException,
                            EncodeException
method that needs to be implemented by subclasses for the XML conversion

Specified by:
requestToXml in class Request
Parameters:
node - the node where the request shall be added to
Throws:
org.w3c.dom.DOMException - on DOM exceptions
EncodeException - if the encoding fails for some reason

getActionCode

protected java.lang.String getActionCode()
return the action string for this request

Specified by:
getActionCode in class Request
Returns:
the action string

requestToKVList

protected void requestToKVList(KVList list)
                        throws EncodeException
method that needs to be implemented by subclasses for the key-value list conversion

Specified by:
requestToKVList in class Request
Parameters:
list - the list that has to be filled
Throws:
EncodeException - if the encoding fails for some reason

toString

public java.lang.String toString()
return a string representation for debugging purposes

Overrides:
toString in class Request
Returns:
the string representation


Copyright © 2005-2011 Knipp Medien und Kommunikation GmbH