01: /*
02: * Created on 09.10.2004
03: *
04: * To change the template for this generated file go to
05: * Window - Preferences - Java - Code Generation - Code and Comments
06: */
07: package de.schlund.pfixcore.example.webservices.chat;
08:
09: import de.schlund.pfixcore.webservice.AbstractService;
10:
11: /**
12: * @author ml
13: *
14: * To change the template for this generated type comment go to
15: * Window - Preferences - Java - Code Generation - Code and Comments
16: */
17: public class ChatImpl extends AbstractService implements Chat {
18:
19: public void login(String nickName) throws Exception {
20: ContextChat cc = (ContextChat) this
21: .getContextResource(ContextChat.class.getName());
22: cc.login(nickName);
23: }
24:
25: public void logout() throws Exception {
26: ContextChat cc = (ContextChat) this
27: .getContextResource(ContextChat.class.getName());
28: cc.logout();
29: }
30:
31: public void sendMessage(String txt, String[] recipients)
32: throws Exception {
33: ContextChat cc = (ContextChat) this
34: .getContextResource(ContextChat.class.getName());
35: cc.sendMessage(txt, recipients);
36: }
37:
38: public Message[] getMessages() {
39: ContextChat cc = (ContextChat) this
40: .getContextResource(ContextChat.class.getName());
41: return cc.getMessages();
42: }
43:
44: public Message[] getLastMessages() {
45: ContextChat cc = (ContextChat) this
46: .getContextResource(ContextChat.class.getName());
47: return cc.getLastMessages();
48: }
49:
50: public String[] getNickNames() {
51: ContextChat cc = (ContextChat) this
52: .getContextResource(ContextChat.class.getName());
53: return cc.getNickNames();
54: }
55:
56: }
|