sqlg2.db.client
Class HttpConnectionFactory
java.lang.Object
sqlg2.db.client.HttpConnectionFactory
- All Implemented Interfaces:
- java.io.Serializable, java.rmi.Remote, IConnectionFactory
public final class HttpConnectionFactory
- extends java.lang.Object
- implements IConnectionFactory
- See Also:
- Serialized Form
Field Summary |
protected HttpId |
id
|
Constructor Summary |
HttpConnectionFactory(java.lang.String url,
java.net.Proxy proxy,
java.lang.String application)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
id
protected final HttpId id
HttpConnectionFactory
public HttpConnectionFactory(java.lang.String url,
java.net.Proxy proxy,
java.lang.String application)
throws java.net.URISyntaxException,
java.net.MalformedURLException
- Throws:
java.net.URISyntaxException
java.net.MalformedURLException
openConnection
public IDBInterface openConnection(java.lang.String user,
java.lang.String password)
throws java.rmi.RemoteException,
java.sql.SQLException
- Description copied from interface:
IConnectionFactory
- Connecting to DB using external authentication (server must support that) -
connection properties are taken from
AuthenticationHelper
. Given parameters
are passed to AuthenticationHelper.authenticate(java.sql.Connection,String,String)
.
- Specified by:
openConnection
in interface IConnectionFactory
- Parameters:
user
- external userpassword
- external password
- Returns:
- DB connection
- Throws:
java.rmi.RemoteException
java.sql.SQLException
openConnection
public IDBInterface openConnection(IDBInterface oldConnection,
java.lang.String password)
throws java.rmi.RemoteException,
java.sql.SQLException
- Description copied from interface:
IConnectionFactory
- This method is rarely used directly, it is intended for use by
IDBInterface.migrateTo(IConnectionFactory)
.
- Specified by:
openConnection
in interface IConnectionFactory
- Parameters:
oldConnection
- already opened DB connectionpassword
- user password
- Returns:
- new DB connection
- Throws:
java.rmi.RemoteException
java.sql.SQLException
getActiveSessions
public SessionInfo[] getActiveSessions()
throws java.rmi.RemoteException
- Description copied from interface:
IConnectionFactory
- Returns active sessions descriptors
- Specified by:
getActiveSessions
in interface IConnectionFactory
- Throws:
java.rmi.RemoteException
getUrl
public java.net.URL getUrl()
setEndpoint
protected final void setEndpoint(sqlg2.db.client.HttpProxy root)
setEndpoint
protected final void setEndpoint(sqlg2.db.client.Endpoint endpoint)
setEndpoint
public final void setEndpoint(java.net.URL url,
java.net.Proxy proxy)
httpInvoke
protected final java.lang.Object httpInvoke(HttpCommand command,
java.lang.Object... params)
throws java.lang.Throwable
- Throws:
java.lang.Throwable
getEndpoint
protected final sqlg2.db.client.Endpoint getEndpoint()
httpInvoke
protected final java.lang.Object httpInvoke(HttpCommand command,
java.lang.Class<?> iface,
java.lang.String method,
java.lang.Class<?>[] paramTypes,
java.lang.Object[] params)
throws java.lang.Throwable
- Throws:
java.lang.Throwable