Methods Summary |
---|
public void | clearImpl(java.lang.String s)
System.out.println("clear called");
sequenceId = null;
System.out.println("sequenceId = \"" + sequenceId + "\"");
messages =
new HashMap<Integer, Integer>();
count = 0;
duplicatesReceived = false;
timedOutOnce = false;
|
public java.lang.String | getBufferSize(java.lang.String s)
return Integer.toString(
sequence.getSequenceConfig().getBufferSize());
|
public java.lang.String | getFlowControl(java.lang.String s)
return Boolean.toString(sequence.getSequenceConfig().getFlowControl());
|
public java.lang.String | getInactivityTimeout(java.lang.String s)
InboundSequence iseq = RMDestination
.getRMDestination().getInboundSequence(sequenceId);
SequenceConfig config = iseq.getSequenceConfig();
System.out.println("timeout = " + config.getInactivityTimeout());
String ret = Long.toString(
config.getInactivityTimeout());
return ret;
|
public java.lang.String | getOrdered(java.lang.String s)
return Boolean.toString(
sequence.getSequenceConfig().getOrdered());
|
public java.lang.String | getSequenceId(java.lang.String s)
return sequenceId;
|
public java.lang.String | getSessionId(java.lang.String s)
String id = null;
if (wscontext != null ) {
id = (String)wscontext.getMessageContext().
get("com.sun.xml.ws.sessionid");
}
if (id != null) {
return id;
} else {
return "no session id";
}
|
public boolean | handleClientRequestMessage(com.sun.xml.ws.rm.Message mess)
return true;
|
public boolean | handleClientResponseMessage(com.sun.xml.ws.rm.Message mess)
return true;
|
public void | handleEndpointRequestMessage(com.sun.xml.ws.rm.Message mess)
//first message will be call to clear() which sets sequenceId to null.
//next message belongs to sequence we want to track
if (sequenceId == null) {
sequence = (InboundSequence)mess.getSequence();
sequenceId = mess.getSequence().getId();
}
synchronized (this) {
if (mess.getSequence().getId().equals(sequenceId)) {
int messageNumber = mess.getMessageNumber();
if (messages.containsValue(messageNumber)) {
duplicatesReceived = true;
}
messages.put(count++, mess.getMessageNumber());
}
}
|
public boolean | handleEndpointResponseMessage(com.sun.xml.ws.rm.Message mess)
return true;
|
public void | handleOutboundHeaders(com.sun.xml.ws.rm.Message mess)
|
public java.lang.String | isSequenceAlive(java.lang.String s)
Sequence seq = RMDestination.
getRMDestination().getInboundSequence(s);
if (seq == null) {
return "false";
} else {
return "true";
}
|
public void | processImpl(java.lang.String s)
if (s.equals("block")) {
try {
Thread.sleep(3000);
} catch (Exception e) {}
}
System.out.println("received message " + s.toString());
System.out.println("sequenceId = \"" + sequenceId + "\"");
System.out.println("sequence = \"" + sequence + "\"");
|
public java.lang.String | reportCount(java.lang.String s)
System.out.println("reportCount.. count = " + count);
return Integer.toString(count);
|
public java.lang.String | reportDuplicates(java.lang.String s)
if (duplicatesReceived) {
return "true";
} else {
return "false";
}
|
public java.lang.String | reportSequence(java.lang.String s)
String result = "";
for (int i = 0; i < count; i++) {
String num = messages.get(i).toString();
result += num;
result += ",";
}
return result;
|
public void | setContext(javax.xml.ws.WebServiceContext context)
this.wscontext = context;
|
public java.lang.String | testTimeout(java.lang.String s)
if (!timedOutOnce) {
timedOutOnce = true;
try {
Thread.currentThread().sleep(10000);
} catch (Exception e) {}
return "false";
} else {
return "true";
}
|