Class AbstractRemoteEntityConnection

    • Field Detail

      • connectionProxy

        protected final transient EntityConnection connectionProxy
        A Proxy for logging method calls
    • Constructor Detail

      • AbstractRemoteEntityConnection

        protected AbstractRemoteEntityConnection​(Domain domain,
                                                 Database database,
                                                 RemoteClient remoteClient,
                                                 int port,
                                                 RMIClientSocketFactory clientSocketFactory,
                                                 RMIServerSocketFactory serverSocketFactory)
                                          throws DatabaseException,
                                                 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 Detail

      • user

        public final User user()
        Returns:
        the user this connection is using
      • isConnected

        public final boolean isConnected()
        Returns:
        true if this connection is connected
      • close

        public final void close()
        Disconnects this connection