PageRenderTime 102ms CodeModel.GetById 60ms app.highlight 4ms RepoModel.GetById 36ms app.codeStats 0ms

/src/mpv5/webshopinterface/wsdjobs/newSystemMessages.java

http://mp-rechnungs-und-kundenverwaltung.googlecode.com/
Java | 77 lines | 32 code | 15 blank | 30 comment | 0 complexity | d66de7bf44d5da515f4842b1dafdacd7 MD5 | raw file
 1
 2/*
 3*  This file is part of YaBS.
 4*
 5*      YaBS is free software: you can redistribute it and/or modify
 6*      it under the terms of the GNU General Public License as published by
 7*      the Free Software Foundation, either version 3 of the License, or
 8*      (at your option) any later version.
 9*
10*      YaBS is distributed in the hope that it will be useful,
11*      but WITHOUT ANY WARRANTY; without even the implied warranty of
12*      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13*      GNU General Public License for more details.
14*
15*      You should have received a copy of the GNU General Public License
16*      along with YaBS.  If not, see <http://www.gnu.org/licenses/>.
17 */
18package mpv5.webshopinterface.wsdjobs;
19
20//~--- non-JDK imports --------------------------------------------------------
21
22import mpv5.logging.Log;
23
24import mpv5.webshopinterface.WSConnectionClient;
25import mpv5.webshopinterface.WSDaemon;
26import mpv5.webshopinterface.WSDaemonJob;
27
28import org.apache.xmlrpc.XmlRpcException;
29
30/**
31 * This job tries to fetch new msgs
32 */
33public class newSystemMessages implements WSDaemonJob {
34    private final WSDaemon daemon;
35
36    /**
37     *  Create a new job
38     * @param ddaemon
39     */
40    public newSystemMessages(WSDaemon ddaemon) {
41        this.daemon = ddaemon;
42    }
43
44    @Override
45    public boolean isOneTimeJob() {
46        return false;
47    }
48
49    @Override
50    public boolean isDone() {
51        return false;
52    }
53
54    @Override
55    public void work(WSConnectionClient client) {
56        Object itd = "0";
57
58        try {
59            Object d =
60                client.getClient().invokeGetCommand(WSConnectionClient.COMMANDS.GET_NEW_SYSTEM_MESSAGES.toString(),
61                    new Object[] { itd }, new Object());
62
63            Log.Debug(this, d);
64
65            // List<ItemMessage> obs = WSIManager.createObjects(d, new ItemMessage());
66//
67//          for (ItemMessage itemMessage : obs) {
68//              Popup.notice(itemMessage);
69//          }
70        } catch (XmlRpcException ex) {
71            Log.Debug(this, ex.getMessage());
72        }
73    }
74}
75
76
77//~ Formatted by Jindent --- http://www.jindent.com