Class AbstractRemoteEntityConnection

All Implemented Interfaces:
Serializable, Remote

public abstract class AbstractRemoteEntityConnection extends UnicastRemoteObject
A base class for remote connections served by a EntityServer. Handles logging of service calls and database connection pooling.
See Also:
  • Field Details

    • connectionProxy

      protected final transient EntityConnection 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 and exports it on the given port number
      Parameters:
      domain - the domain model
      database - defines the underlying database
      remoteClient - information about the client requesting the connection
      port - the port to use when exporting this remote connection
      clientSocketFactory - the client socket factory to use, null for default
      serverSocketFactory - the server socket factory to use, null for default
      Throws:
      RemoteException - in case of an exception
      DatabaseException - in case a database connection can not be established, for example if a wrong username or password is provided
  • Method Details

    • user

      public final User 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