|
32 | 32 | import static io.vertx.mssqlclient.impl.utils.ByteBufUtils.readUnsignedByteLengthString; |
33 | 33 | import static io.vertx.mssqlclient.impl.utils.ByteBufUtils.readUnsignedShortLengthString; |
34 | 34 |
|
35 | | -public abstract class MSSQLCommandCodec<R, C extends CommandBase<R>> extends CommandMessage<R, C> { |
| 35 | +public abstract class MSSQLCommandMessage<R, C extends CommandBase<R>> extends CommandMessage<R, C> { |
36 | 36 |
|
37 | 37 | public TdsMessageCodec tdsMessageCodec; |
38 | 38 |
|
39 | 39 | public MSSQLException failure; |
40 | 40 | public R result; |
41 | 41 |
|
42 | | - MSSQLCommandCodec(C cmd) { |
| 42 | + MSSQLCommandMessage(C cmd) { |
43 | 43 | super(cmd); |
44 | 44 | } |
45 | 45 |
|
46 | | - public static MSSQLCommandCodec<?, ?> wrap(CommandBase<?> cmd) { |
| 46 | + public static MSSQLCommandMessage<?, ?> wrap(CommandBase<?> cmd) { |
47 | 47 | if (cmd instanceof PreLoginCommand) { |
48 | | - return new PreLoginCommandCodec((PreLoginCommand) cmd); |
| 48 | + return new PreLoginMSSQLCommandMessage((PreLoginCommand) cmd); |
49 | 49 | } else if (cmd instanceof InitCommand) { |
50 | | - return new InitCommandCodec((InitCommand) cmd); |
| 50 | + return new InitMSSQLCommandMessage((InitCommand) cmd); |
51 | 51 | } else if (cmd instanceof SimpleQueryCommand) { |
52 | | - return new SQLBatchCommandCodec<>((SimpleQueryCommand<?>) cmd); |
| 52 | + return new SQLBatchMSSQLCommandMessage<>((SimpleQueryCommand<?>) cmd); |
53 | 53 | } else if (cmd instanceof PrepareStatementCommand) { |
54 | | - return new PrepareStatementCodec((PrepareStatementCommand) cmd); |
| 54 | + return new PrepareStatementMSSQLMessage((PrepareStatementCommand) cmd); |
55 | 55 | } else if (cmd instanceof CloseStatementCommand) { |
56 | | - return new CloseStatementCommandCodec((CloseStatementCommand) cmd); |
| 56 | + return new CloseStatementMSSQLCommandMessage((CloseStatementCommand) cmd); |
57 | 57 | } else if (cmd == CloseConnectionCommand.INSTANCE) { |
58 | | - return new CloseConnectionCommandCodec((CloseConnectionCommand) cmd); |
| 58 | + return new CloseConnectionMSSQLCommandMessage((CloseConnectionCommand) cmd); |
59 | 59 | } else if (cmd instanceof CloseCursorCommand) { |
60 | | - return new CloseCursorCommandCodec((CloseCursorCommand) cmd); |
| 60 | + return new CloseCursorMSSQLCommandMessage((CloseCursorCommand) cmd); |
61 | 61 | } else { |
62 | 62 | throw new UnsupportedOperationException(); |
63 | 63 | } |
|
0 commit comments