Module is.codion.framework.server
Package is.codion.framework.server
Class AbstractRemoteEntityConnection
java.lang.Object
is.codion.framework.server.AbstractRemoteEntityConnection
- All Implemented Interfaces:
Remote
A base class for remote connections served by a
EntityServer.
Handles logging of service calls and database connection pooling.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final EntityConnectionA Proxy for logging method calls -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractRemoteEntityConnection(Domain domain, Database database, RemoteClient remoteClient, int port, RMIClientSocketFactory clientSocketFactory, RMIServerSocketFactory serverSocketFactory) Instantiates a new AbstractRemoteEntityConnection, exported on the given port number unless the port is negative, in which case the connection is not exported (it serves an HTTP client in-process and needs no RMI stub). -
Method Summary
-
Field Details
-
connectionProxy
A Proxy for logging method calls
-
-
Constructor Details
-
AbstractRemoteEntityConnection
protected AbstractRemoteEntityConnection(Domain domain, Database database, RemoteClient remoteClient, int port, RMIClientSocketFactory clientSocketFactory, RMIServerSocketFactory serverSocketFactory) throws RemoteException Instantiates a new AbstractRemoteEntityConnection, exported on the given port number unless the port is negative, in which case the connection is not exported (it serves an HTTP client in-process and needs no RMI stub).- Parameters:
domain- the domain modeldatabase- defines the underlying databaseremoteClient- information about the client requesting the connectionport- the port to use when exporting this remote connection, negative to not exportclientSocketFactory- the client socket factory to use, null for defaultserverSocketFactory- the server socket factory to use, null for default- Throws:
RemoteException- in case of an exceptionDatabaseException- in case a database connection can not be established, for example if a wrong username or password is provided
-
-
Method Details
-
user
- Returns:
- the user this connection is using
-
connected
public final boolean connected()- Returns:
- true if this connection is connected
-
close
public final void close()Disconnects this connection
-