|
28 | 28 | import io.vertx.sqlclient.spi.protocol.PrepareStatementCommand; |
29 | 29 | import io.vertx.sqlclient.spi.protocol.SimpleQueryCommand; |
30 | 30 |
|
31 | | -public abstract class CommandCodec<R, C extends CommandBase<R>> extends CommandMessage<R, C> { |
| 31 | +public abstract class DB2CommandMessage<R, C extends CommandBase<R>> extends CommandMessage<R, C> { |
32 | 32 |
|
33 | 33 | Handler<? super CommandResponse<R>> completionHandler; |
34 | 34 | public Throwable failure; |
35 | 35 | public R result; |
36 | 36 | DB2Encoder encoder; |
37 | 37 |
|
38 | | - CommandCodec(C cmd) { |
| 38 | + DB2CommandMessage(C cmd) { |
39 | 39 | super(cmd); |
40 | 40 | } |
41 | 41 |
|
42 | 42 | @SuppressWarnings({ "rawtypes", "unchecked" }) |
43 | | - public static CommandCodec<?, ?> wrap(CommandBase<?> cmd) { |
44 | | - CommandCodec<?, ?> codec = null; |
| 43 | + public static DB2CommandMessage<?, ?> wrap(CommandBase<?> cmd) { |
| 44 | + DB2CommandMessage<?, ?> codec = null; |
45 | 45 | if (cmd instanceof InitialHandshakeCommand) { |
46 | | - codec = new InitialHandshakeCommandCodec((InitialHandshakeCommand) cmd); |
| 46 | + codec = new InitialHandshakeDB2CommandMessage((InitialHandshakeCommand) cmd); |
47 | 47 | } else if (cmd instanceof SimpleQueryCommand) { |
48 | | - codec = new SimpleQueryCommandCodec((SimpleQueryCommand) cmd); |
| 48 | + codec = new SimpleQueryDB2CommandMessage((SimpleQueryCommand) cmd); |
49 | 49 | } else if (cmd instanceof CloseConnectionCommand) { |
50 | | - codec = new CloseConnectionCommandCodec((CloseConnectionCommand) cmd); |
| 50 | + codec = new CloseConnectionDB2CommandMessage((CloseConnectionCommand) cmd); |
51 | 51 | } else if (cmd instanceof PrepareStatementCommand) { |
52 | | - codec = new PrepareStatementCodec((PrepareStatementCommand) cmd); |
| 52 | + codec = new PrepareStatementDB2CommandMessage((PrepareStatementCommand) cmd); |
53 | 53 | } else if (cmd instanceof CloseStatementCommand) { |
54 | | - codec = new CloseStatementCommandCodec((CloseStatementCommand) cmd); |
| 54 | + codec = new CloseStatementDB2CommandMessage((CloseStatementCommand) cmd); |
55 | 55 | } else if (cmd instanceof CloseCursorCommand) { |
56 | | - codec = new CloseCursorCommandCodec((CloseCursorCommand) cmd); |
| 56 | + codec = new CloseCursorDB2CommandMessage((CloseCursorCommand) cmd); |
57 | 57 | } else if (cmd instanceof PingCommand) { |
58 | | - codec = new PingCommandCodec((PingCommand) cmd); |
| 58 | + codec = new PingDB2CommandMessage((PingCommand) cmd); |
59 | 59 | // } else if (cmd instanceof InitDbCommand) { |
60 | 60 | // codec = new InitDbCommandCodec((InitDbCommand) cmd); |
61 | 61 | // } else if (cmd instanceof StatisticsCommand) { |
|
0 commit comments