diff options
author | Mili Verma <mili.verma@isode.com> | 2012-01-10 15:55:29 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2012-01-11 13:44:37 (GMT) |
commit | be94e872d9423501c688c84c6cb945a420a5cb18 (patch) | |
tree | 77986e9e30282b526c0246bb6344c175b54ffb5f /src/com/isode/stroke/adhoc/OutgoingAdHocCommandSession.java | |
parent | c9ff80a46b13b7d1987bf54cae87738a9baf552b (diff) | |
download | stroke-be94e872d9423501c688c84c6cb945a420a5cb18.zip stroke-be94e872d9423501c688c84c6cb945a420a5cb18.tar.bz2 |
Update review comment related stuff
This patch addresses some review comments:
1. Updates the Javadoc.
2. Disallows arguments from being null - throws NullPointerException.
3. Updates each test to use its own DummyEventLoop.
Test-information:
Unit tests pass.
Diffstat (limited to 'src/com/isode/stroke/adhoc/OutgoingAdHocCommandSession.java')
-rw-r--r-- | src/com/isode/stroke/adhoc/OutgoingAdHocCommandSession.java | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/com/isode/stroke/adhoc/OutgoingAdHocCommandSession.java b/src/com/isode/stroke/adhoc/OutgoingAdHocCommandSession.java index a9db0b6..6b1d04c 100644 --- a/src/com/isode/stroke/adhoc/OutgoingAdHocCommandSession.java +++ b/src/com/isode/stroke/adhoc/OutgoingAdHocCommandSession.java @@ -53,15 +53,15 @@ public class OutgoingAdHocCommandSession { }; /** - * Emitted when the form for the next stage is available. The client should - * add a listener to this signal which will be called when the server sends + * Emitted when the form for the next stage is available. The caller should + * add a listener to this signal which will be invoked when the target sends * a form. */ public final Signal1<Command> onNextStageReceived = new Signal1<Command>(); /** - * Emitted on error. The client should add a listener to this signal which - * will be called when the server sends an error. + * Emitted on error. The caller should add a listener to this signal which + * will be invoked when the target sends an error. */ public final Signal1<ErrorPayload> onError = new Signal1<ErrorPayload>(); @@ -75,13 +75,13 @@ public class OutgoingAdHocCommandSession { /** * Create an Ad-Hoc command session. The initial command will be sent to the * server on calling {@link #start()}. - * - * @param to JID of the user for which the Ad-Hoc command is executed, must - * not be null + * + * @param to JID of the entity that the Ad-Hoc command is executed on (user + * JID, server JID, etc.), must not be null * @param commandNode Node part of the Ad-Hoc command as published by the - * server (e.g. "http://isode.com/xmpp/commands#test"), must not + * target (e.g. "http://isode.com/xmpp/commands#test"), must not * be null - * @param iqRouter TODO: not sure how to explain this, must not be null + * @param iqRouter IQ router to be used for the session, must not be null */ public OutgoingAdHocCommandSession(JID to, String commandNode, IQRouter iqRouter) { @@ -156,7 +156,7 @@ public class OutgoingAdHocCommandSession { public void start() { Action action = null; GenericRequest<Command> commandRequest = new GenericRequest<Command>( - IQ.Type.Set, to_, new Command(commandNode_, null, action), + IQ.Type.Set, to_, new Command(commandNode_, "", action), iqRouter_); commandRequest.onResponse.connect(new Slot2<Command, ErrorPayload>() { public void call(Command payload, ErrorPayload error) { |