@Test public void testLogon() throws Exception { SocketServerConnection connection = createConnection(null); assertEquals(String.valueOf(1), connection.getLogonResult().getSessionID()); }
private void logon(ILogon newLogon) throws LogonException, TeiidComponentException, CommunicationException { SocketServerInstance instance = this.serverInstance; updateConnectionProperties(connProps, instance.getLocalAddress(), true, this.connectionFactory); LogonResult newResult = null; if (connProps.contains(TeiidURL.CONNECTION.JAAS_NAME)) { newResult = MakeGSS.authenticate(newLogon, connProps); } else { newResult = newLogon.logon(connProps); } AuthenticationType type = (AuthenticationType) newResult.getProperty(ILogon.AUTH_TYPE); if (type != null) { if (type == AuthenticationType.GSS) { newResult = MakeGSS.authenticate(newLogon, connProps); } else { throw new LogonException(JDBCPlugin.Event.TEIID20034, JDBCPlugin.Util.gs(JDBCPlugin.Event.TEIID20034, type)); } } logoff(); this.logonResult = newResult; }
SocketServerConnection implements ServerConnection { private void logon(ILogon newLogon) throws LogonException, TeiidComponentException, CommunicationException { SocketServerInstance instance = this.serverInstance; updateConnectionProperties(connProps, instance.getLocalAddress(), true, this.connectionFactory); LogonResult newResult = null; if (connProps.contains(TeiidURL.CONNECTION.JAAS_NAME)) { newResult = MakeGSS.authenticate(newLogon, connProps); } else { newResult = newLogon.logon(connProps); } AuthenticationType type = (AuthenticationType) newResult.getProperty(ILogon.AUTH_TYPE); if (type != null) { if (type == AuthenticationType.GSS) { newResult = MakeGSS.authenticate(newLogon, connProps); } else { throw new LogonException(JDBCPlugin.Event.TEIID20034, JDBCPlugin.Util.gs(JDBCPlugin.Event.TEIID20034, type)); } } logoff(); this.logonResult = newResult; } }
SocketServerConnection implements ServerConnection { private void logon(ILogon newLogon) throws LogonException, TeiidComponentException, CommunicationException { SocketServerInstance instance = this.serverInstance; updateConnectionProperties(connProps, instance.getLocalAddress(), true, this.connectionFactory); LogonResult newResult = null; if (connProps.contains(TeiidURL.CONNECTION.JAAS_NAME)) { newResult = MakeGSS.authenticate(newLogon, connProps); } else { newResult = newLogon.logon(connProps); } AuthenticationType type = (AuthenticationType) newResult.getProperty(ILogon.AUTH_TYPE); if (type != null) { if (type == AuthenticationType.GSS) { newResult = MakeGSS.authenticate(newLogon, connProps); } else { throw new LogonException(JDBCPlugin.Event.TEIID20034, JDBCPlugin.Util.gs(JDBCPlugin.Event.TEIID20034, type)); } } logoff(); this.logonResult = newResult; } SocketServerConnection(
            SocketServerInstanceFactory connectionFactory, boolean secure,
            UrlServerDiscovery serverDiscovery, Properties connProps); }
SocketServerConnection implements ServerConnection { private void logon(ILogon newLogon) throws LogonException, TeiidComponentException, CommunicationException { SocketServerInstance instance = this.serverInstance; updateConnectionProperties(connProps, instance.getLocalAddress(), true, this.connectionFactory); LogonResult newResult = null; if (connProps.contains(TeiidURL.CONNECTION.JAAS_NAME)) { newResult = MakeGSS.authenticate(newLogon, connProps); } else { newResult = newLogon.logon(connProps); } AuthenticationType type = (AuthenticationType) newResult.getProperty(ILogon.AUTH_TYPE); if (type != null) { if (type == AuthenticationType.GSS) { newResult = MakeGSS.authenticate(newLogon, connProps); } else { throw new LogonException(JDBCPlugin.Event.TEIID20034, JDBCPlugin.Util.gs(JDBCPlugin.Event.TEIID20034, type)); } } logoff(); this.logonResult = newResult; } SocketServerConnection(
            SocketServerInstanceFactory connectionFactory, boolean secure,
            UrlServerDiscovery serverDiscovery, Properties connProps); synchronized SocketServerInstance selectServerInstance(); static void updateConnectionProperties(Properties connectionProperties, InetAddress addr, boolean setMac, HostnameResolver resolver); T getService(Class<T> iface); synchronized void close(); boolean isOpen(long msToTest); LogonResult getLogonResult(); boolean isSameInstance(ServerConnection otherService); void setFailOver(boolean failOver); void setFailOverPingInterval(int pingFailOverInterval); @Override void authenticate(); @Override boolean supportsContinuous(); @Override boolean isLocal(); @Override String getServerVersion(); }
SocketServerConnection implements ServerConnection { private void logon(ILogon newLogon) throws LogonException, TeiidComponentException, CommunicationException { SocketServerInstance instance = this.serverInstance; updateConnectionProperties(connProps, instance.getLocalAddress(), true, this.connectionFactory); LogonResult newResult = null; if (connProps.contains(TeiidURL.CONNECTION.JAAS_NAME)) { newResult = MakeGSS.authenticate(newLogon, connProps); } else { newResult = newLogon.logon(connProps); } AuthenticationType type = (AuthenticationType) newResult.getProperty(ILogon.AUTH_TYPE); if (type != null) { if (type == AuthenticationType.GSS) { newResult = MakeGSS.authenticate(newLogon, connProps); } else { throw new LogonException(JDBCPlugin.Event.TEIID20034, JDBCPlugin.Util.gs(JDBCPlugin.Event.TEIID20034, type)); } } logoff(); this.logonResult = newResult; } SocketServerConnection(
            SocketServerInstanceFactory connectionFactory, boolean secure,
            UrlServerDiscovery serverDiscovery, Properties connProps); synchronized SocketServerInstance selectServerInstance(); static void updateConnectionProperties(Properties connectionProperties, InetAddress addr, boolean setMac, HostnameResolver resolver); T getService(Class<T> iface); synchronized void close(); boolean isOpen(long msToTest); LogonResult getLogonResult(); boolean isSameInstance(ServerConnection otherService); void setFailOver(boolean failOver); void setFailOverPingInterval(int pingFailOverInterval); @Override void authenticate(); @Override boolean supportsContinuous(); @Override boolean isLocal(); @Override String getServerVersion();  }