private void initializeCommands() { // The commands are cached here, but are just referencing the ones // stored in the CommandInitializer this.commands = CommandInitializer.getCommands(this); }
public static void setTestCommands() throws Exception { getLogWriter().info("setTestCommands invoked"); Map testCommands = new HashMap(); testCommands.putAll((Map)CommandInitializer.ALL_COMMANDS .get(AcceptorImpl.VERSION)); testCommands.put(new Integer(MessageType.PUT), new TestPut()); CommandInitializer.testSetCommands(testCommands); getLogWriter().info("end of setTestCommands"); }
public static void setTestCommands() throws Exception { getLogWriter().info("setTestCommands invoked"); Map testCommands = new HashMap(); testCommands.putAll((Map)CommandInitializer.ALL_COMMANDS .get(Version.GFE_57)); CommandInitializer.testSetCommands(testCommands); getLogWriter().info("end of setTestCommands"); }
private void initializeCommands() { // The commands are cached here, but are just referencing the ones // stored in the CommandInitializer this.commands = CommandInitializer.getCommands(this); }
public static void setTestCommands() throws Exception { getLogWriter().info("setTestCommands invoked"); Map testCommands = new HashMap(); testCommands.putAll((Map)CommandInitializer.ALL_COMMANDS .get(Version.GFE_57)); CommandInitializer.testSetCommands(testCommands); getLogWriter().info("end of setTestCommands"); }
public static Map<Integer,Command> getCommands(ServerConnection connection) { return getCommands(connection.getClientVersion()); }
public static Map<Integer,Command> getCommands(ServerConnection connection) { return getCommands(connection.getClientVersion()); }
/** Return the <code>Version</code> represented by specified ordinal */ public static Version fromOrdinal(short ordinal, boolean forGFEClients) throws UnsupportedVersionException { // Un-version client(client's prior to release 5.7) doesn't send version // byte in the handshake. So the next byte in the handshake has value 59 and // is interpreted as version byte. We are not supporting version 59 to // distinguish version client from unversion. Please use version ordinal 60 // after 58 if required. if (ordinal == NOT_SUPPORTED_ORDINAL){ throw new UnsupportedVersionException("Un-versioned clients are not supported. "); } if (ordinal == TOKEN_ORDINAL) { return TOKEN; } // for GFE clients also check that there must be a commands object mapping // for processing (SQLF product versions will not work) if ((VALUES.length < ordinal + 1) || VALUES[ordinal] == null || (forGFEClients && CommandInitializer.getCommands(VALUES[ordinal]) == null)) { throw new UnsupportedVersionException( LocalizedStrings.Version_REMOTE_VERSION_NOT_SUPPORTED .toLocalizedString(ordinal, CURRENT.name)); } return VALUES[ordinal]; }