KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > icesoft > faces > webapp > command > Pong


1 package com.icesoft.faces.webapp.command;
2
3 import java.io.IOException JavaDoc;
4 import java.io.Writer JavaDoc;
5
6 public class Pong implements Command {
7
8     public Command coalesceWith(Command command) {
9         return command.coalesceWith(this);
10     }
11
12     public Command coalesceWith(Macro macro) {
13         macro.addCommand(this);
14         return macro;
15     }
16
17     public Command coalesceWith(UpdateElements updateElements) {
18         return new Macro(updateElements, this);
19     }
20
21     public Command coalesceWith(Redirect redirect) {
22         return redirect;
23     }
24
25     public Command coalesceWith(SessionExpired sessionExpired) {
26         return sessionExpired;
27     }
28
29     public Command coalesceWith(SetCookie setCookie) {
30         return new Macro(setCookie, this);
31     }
32
33     public Command coalesceWith(NOOP noop) {
34         return this;
35     }
36
37     public Command coalesceWith(Pong pong) {
38         return pong;
39     }
40
41     public void serializeTo(Writer JavaDoc writer) throws IOException JavaDoc {
42         writer.write("<pong/>");
43     }
44 }
45
Popular Tags