cgl.narada.wsinfra.wsr.impl
Class WsrElementCreationImpl

java.lang.Object
  extended by cgl.narada.wsinfra.wsr.impl.WsrElementCreationImpl
All Implemented Interfaces:
WsrElementCreation

public class WsrElementCreationImpl
extends Object
implements WsrElementCreation

This is a class which facilitates the creation of WSR elements that are added to exchanges.


Method Summary
static WsrElementCreation getInstance()
           
 PollRequestDocument newPollRequest(Hashtable groupIds)
          Creates a PollRequest Document for groups which has set of reply ranges in Hashtable(groupId and Hashtable of replyranges)
 PollRequestDocument newPollRequest(Hashtable groupIds, String replyTo)
          Creates a PollRequest Document for groups which has set of reply ranges in Hashtable(groupId and Hashtable of replyranges)
 PollRequestDocument newPollRequest(String groupId)
          Creates a PollRequest Document based on the specified parameters
 PollRequestDocument newPollRequest(String[] groupId)
          Creates a PollRequest Document based on the specified parameters
 PollRequestDocument newPollRequest(String[] groupId, String replyTo)
          Creates a PollRequest Document based on the specified parameters
 PollRequestDocument newPollRequest(String groupId, Hashtable range)
          Creates a PollRequest Document for one group which has set of reply ranges in Hashtable(from and to element pair)
 PollRequestDocument newPollRequest(String groupId, Hashtable range, String replyTo)
          Creates a PollRequest Document based on the specified parameters
 PollRequestDocument newPollRequest(String groupId, String replyTo)
          Creates a PollRequest Document based on the specified parameters
 RequestDocument newRequest(String groupId, Calendar groupExpiryTime, long sequenceNumber, boolean lastMessage, Calendar messageExpiryTime, String replyPatternName)
          Creates a Request Document based on the specified mandatory parameters with some optional parameters This creates a request for PollRequest and Response RM reply pattern
 RequestDocument newRequest(String groupId, Calendar groupExpiryTime, long sequenceNumber, boolean lastMessage, Calendar messageExpiryTime, String replyPatternName, String replyTo)
          Creates a Request Document based on the specified mandatory parameters with some optional parameters This creates a request for callback RM reply pattern
 RequestDocument newRequest(String groupId, GDuration groupMaxIdleDuration, long sequenceNumber, boolean lastMessage, Calendar messageExpiryTime, String replyPatternName)
          Creates a Request Document based on the specified mandatory parameters with some optional parameters This creates a request for PollRequest and Response RM reply pattern
 RequestDocument newRequest(String groupId, GDuration groupMaxIdleDuration, long sequenceNumber, boolean lastMessage, Calendar messageExpiryTime, String replyPatternName, String replyTo)
          Creates a Request Document based on the specified mandatory parameters with some optional parameters This creates a request for callback RM reply pattern
 RequestDocument newRequest(String groupId, long sequenceNumber, boolean lastMessage, Calendar messageExpiryTime, String replyPatternName)
          Creates a Request Document based on the specified mandatory parameters This creates a request for PollRequest and Response RM reply pattern
 RequestDocument newRequest(String groupId, long sequenceNumber, boolean lastMessage, Calendar messageExpiryTime, String replyPatternName, String replyTo)
          Creates a Request Document based on the specified mandatory parameters This creates a request for Callback RM reply pattern
 ResponseDocument newResponse()
          Creates a simple ResponseDocument with single Response element
 ResponseDocument newResponse(ResponseDocument responseDocument, String groupId, Hashtable rangesAndFaultTable)
          Adds a SequenceReply element(group with multiple messages)To given ResponseDocument Here Hashtable contains (Hashtable of ranges(from and to), fault or ack) pair
 ResponseDocument newResponse(ResponseDocument responseDocument, String groupId, long from, long to, String fault)
          Adds a SequenceReply element(group with multiple messages)To given ResponseDocument with only one ReplyRange
 ResponseDocument newResponse(ResponseDocument responseDocument, String groupId, String fault)
          Adds a NonSequenceReply element(group with single message) To given ResponseDocument.
 void processPollRequest(PollRequestType pollRequestType, String groupId, Hashtable range)
          Creates a PollRequest Document based on the specified parameters
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static WsrElementCreation getInstance()

newRequest

public RequestDocument newRequest(String groupId,
                                  long sequenceNumber,
                                  boolean lastMessage,
                                  Calendar messageExpiryTime,
                                  String replyPatternName)
Creates a Request Document based on the specified mandatory parameters This creates a request for PollRequest and Response RM reply pattern

Specified by:
newRequest in interface WsrElementCreation

newRequest

public RequestDocument newRequest(String groupId,
                                  long sequenceNumber,
                                  boolean lastMessage,
                                  Calendar messageExpiryTime,
                                  String replyPatternName,
                                  String replyTo)
Creates a Request Document based on the specified mandatory parameters This creates a request for Callback RM reply pattern

Specified by:
newRequest in interface WsrElementCreation

newRequest

public RequestDocument newRequest(String groupId,
                                  Calendar groupExpiryTime,
                                  long sequenceNumber,
                                  boolean lastMessage,
                                  Calendar messageExpiryTime,
                                  String replyPatternName)
Creates a Request Document based on the specified mandatory parameters with some optional parameters This creates a request for PollRequest and Response RM reply pattern

Specified by:
newRequest in interface WsrElementCreation

newRequest

public RequestDocument newRequest(String groupId,
                                  GDuration groupMaxIdleDuration,
                                  long sequenceNumber,
                                  boolean lastMessage,
                                  Calendar messageExpiryTime,
                                  String replyPatternName)
Creates a Request Document based on the specified mandatory parameters with some optional parameters This creates a request for PollRequest and Response RM reply pattern

Specified by:
newRequest in interface WsrElementCreation

newRequest

public RequestDocument newRequest(String groupId,
                                  Calendar groupExpiryTime,
                                  long sequenceNumber,
                                  boolean lastMessage,
                                  Calendar messageExpiryTime,
                                  String replyPatternName,
                                  String replyTo)
Creates a Request Document based on the specified mandatory parameters with some optional parameters This creates a request for callback RM reply pattern

Specified by:
newRequest in interface WsrElementCreation

newRequest

public RequestDocument newRequest(String groupId,
                                  GDuration groupMaxIdleDuration,
                                  long sequenceNumber,
                                  boolean lastMessage,
                                  Calendar messageExpiryTime,
                                  String replyPatternName,
                                  String replyTo)
Creates a Request Document based on the specified mandatory parameters with some optional parameters This creates a request for callback RM reply pattern

Specified by:
newRequest in interface WsrElementCreation

newPollRequest

public PollRequestDocument newPollRequest(String[] groupId)
Creates a PollRequest Document based on the specified parameters

Specified by:
newPollRequest in interface WsrElementCreation

newPollRequest

public PollRequestDocument newPollRequest(String groupId)
Creates a PollRequest Document based on the specified parameters

Specified by:
newPollRequest in interface WsrElementCreation

processPollRequest

public void processPollRequest(PollRequestType pollRequestType,
                               String groupId,
                               Hashtable range)
Creates a PollRequest Document based on the specified parameters


newPollRequest

public PollRequestDocument newPollRequest(String groupId,
                                          Hashtable range)
Creates a PollRequest Document for one group which has set of reply ranges in Hashtable(from and to element pair)

Specified by:
newPollRequest in interface WsrElementCreation

newPollRequest

public PollRequestDocument newPollRequest(Hashtable groupIds)
Creates a PollRequest Document for groups which has set of reply ranges in Hashtable(groupId and Hashtable of replyranges)

Specified by:
newPollRequest in interface WsrElementCreation

newPollRequest

public PollRequestDocument newPollRequest(String groupId,
                                          String replyTo)
Creates a PollRequest Document based on the specified parameters

Specified by:
newPollRequest in interface WsrElementCreation

newPollRequest

public PollRequestDocument newPollRequest(String[] groupId,
                                          String replyTo)
Creates a PollRequest Document based on the specified parameters

Specified by:
newPollRequest in interface WsrElementCreation

newPollRequest

public PollRequestDocument newPollRequest(String groupId,
                                          Hashtable range,
                                          String replyTo)
Creates a PollRequest Document based on the specified parameters

Specified by:
newPollRequest in interface WsrElementCreation

newPollRequest

public PollRequestDocument newPollRequest(Hashtable groupIds,
                                          String replyTo)
Creates a PollRequest Document for groups which has set of reply ranges in Hashtable(groupId and Hashtable of replyranges)

Specified by:
newPollRequest in interface WsrElementCreation

newResponse

public ResponseDocument newResponse()
Creates a simple ResponseDocument with single Response element

Specified by:
newResponse in interface WsrElementCreation

newResponse

public ResponseDocument newResponse(ResponseDocument responseDocument,
                                    String groupId,
                                    String fault)
Adds a NonSequenceReply element(group with single message) To given ResponseDocument. If fault is (ACK) then it is acknowledgement else it is fault

Specified by:
newResponse in interface WsrElementCreation

newResponse

public ResponseDocument newResponse(ResponseDocument responseDocument,
                                    String groupId,
                                    Hashtable rangesAndFaultTable)
Adds a SequenceReply element(group with multiple messages)To given ResponseDocument Here Hashtable contains (Hashtable of ranges(from and to), fault or ack) pair

Specified by:
newResponse in interface WsrElementCreation

newResponse

public ResponseDocument newResponse(ResponseDocument responseDocument,
                                    String groupId,
                                    long from,
                                    long to,
                                    String fault)
Adds a SequenceReply element(group with multiple messages)To given ResponseDocument with only one ReplyRange

Specified by:
newResponse in interface WsrElementCreation


For comments and suggestions please send e-mail to The NaradaBrokering Project