01: package com.icesoft.faces.webapp.command;
02:
03: import java.io.IOException;
04: import java.io.Writer;
05:
06: public class Pong implements Command {
07:
08: public Command coalesceWith(Command command) {
09: 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 writer) throws IOException {
42: writer.write("<pong/>");
43: }
44: }
|