summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
Diffstat (limited to 'src/com')
-rw-r--r--src/com/isode/stroke/disco/GetDiscoItemsRequest.java32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/com/isode/stroke/disco/GetDiscoItemsRequest.java b/src/com/isode/stroke/disco/GetDiscoItemsRequest.java
new file mode 100644
index 0000000..1214816
--- /dev/null
+++ b/src/com/isode/stroke/disco/GetDiscoItemsRequest.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2010-2015, Isode Limited.
+ * All rights reserved.
+ */
+package com.isode.stroke.disco;
+
+import com.isode.stroke.elements.DiscoItems;
+import com.isode.stroke.elements.IQ;
+import com.isode.stroke.jid.JID;
+import com.isode.stroke.queries.GenericRequest;
+import com.isode.stroke.queries.IQRouter;
+
+public class GetDiscoItemsRequest extends GenericRequest<DiscoItems> {
+
+ public static GetDiscoItemsRequest create(final JID jid, IQRouter router) {
+ return new GetDiscoItemsRequest(jid, router);
+ }
+
+ public static GetDiscoItemsRequest create(final JID jid, final String node, IQRouter router) {
+ return new GetDiscoItemsRequest(jid, node, router);
+ }
+
+ private GetDiscoItemsRequest(final JID jid, IQRouter router) {
+ super(IQ.Type.Get, jid, new DiscoItems(), router);
+ }
+
+ private GetDiscoItemsRequest(final JID jid, final String node, IQRouter router) {
+ this(jid, router);
+ getPayloadGeneric().setNode(node);
+ }
+
+}