KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > quikj > application > web > echo > plugin > EchoPluginAppClient


1 package com.quikj.application.web.echo.plugin;
2
3 import com.quikj.server.web.*;
4 import com.quikj.server.framework.*;
5
6 public class EchoPluginAppClient implements PluginAppClientInterface
7 {
8     public EchoPluginAppClient()
9     {
10     }
11
12     public boolean newConnection (String JavaDoc host, HTTPEndPoint parent)
13     {
14     this.host = host;
15     this.parent = parent;
16     return true;
17     }
18
19     public boolean requestReceived (int request_id, String JavaDoc content_type, String JavaDoc body)
20     {
21     if (body != null)
22         {
23         parent.sendResponseMessageToClient (request_id,
24                             200,
25                             "OK",
26                             content_type,
27                             body,
28                             true);
29         }
30     return true;
31     }
32
33     public boolean responseReceived (int request_id, int status, String JavaDoc reason,
34                   String JavaDoc content_type, String JavaDoc body)
35     {
36     // not supposed to get one
37
return false;
38     }
39
40     public boolean eventReceived (AceMessageInterface event)
41     {
42     // not supposed to get one, ignore
43
return false;
44     }
45
46     public void connectionClosed()
47     {
48     }
49
50     private String JavaDoc host;
51     private HTTPEndPoint parent;
52 }
53
54
55
56
Popular Tags