org.jminor.framework.server
Interface EntityConnectionServerAdmin

All Superinterfaces:
Remote
All Known Implementing Classes:
EntityConnectionServerAdminImpl

public interface EntityConnectionServerAdmin
extends Remote

Defines the server admin service methods.


Method Summary
 void disconnect(UUID clientID)
          Unregisters the connection from the server, if connection pooling is enabled for the user the connection is pooled.
 int getActiveConnectionCount()
           
 long getAllocatedMemory()
           
 Collection<ClientInfo> getClients()
           
 Collection<ClientInfo> getClients(String clientTypeID)
           
 Collection<ClientInfo> getClients(User user)
           
 Collection<String> getClientTypes()
           
 int getConnectionCount()
           
 int getConnectionLimit()
           
 int getConnectionPoolCleanupInterval(User user)
           
 ConnectionPoolStatistics getConnectionPoolStatistics(User user, long since)
           
 int getConnectionTimeout()
          Returns the connection timeout in ms
 Database.Statistics getDatabaseStatistics()
           
 String getDatabaseURL()
           
 List<User> getEnabledConnectionPools()
           
 Map<String,String> getEntityDefinitions()
           
 ch.qos.logback.classic.Level getLoggingLevel()
           
 int getMaintenanceInterval()
           
 int getMaximumConnectionPoolSize(User user)
           
 int getMaximumPoolCheckOutTime(User user)
           
 int getMaximumPoolRetryWaitPeriod(User user)
           
 long getMaxMemory()
           
 String getMemoryUsage()
           
 int getMinimumConnectionPoolSize(User user)
           
 int getPoolConnectionThreshold(User user)
           
 int getPooledConnectionTimeout(User user)
           
 int getRequestsPerSecond()
           
 int getServerDbPort()
           
 ServerLog getServerLog(UUID clientID)
           
 String getServerName()
           
 int getServerPort()
           
 long getStartDate()
           
 String getSystemProperties()
           
 long getUsedMemory()
           
 Collection<User> getUsers()
           
 int getWarningTimeExceededPerSecond()
           
 int getWarningTimeThreshold()
           
 boolean isCollectFineGrainedPoolStatistics(User user)
           
 boolean isConnectionPoolEnabled(User user)
           
 boolean isLoggingOn(UUID clientID)
          Returns true if logging is enabled for the given connection
 void loadDomainModel(URI location, String domainClassName)
          Loads the domain model found int he given class, at the given location
 void performGC()
          Performs garbage collection
 void removeConnections(boolean inactiveOnly)
          Removes connections.
 void resetConnectionPoolStatistics(User user)
          Resets the statistics that have been collected so far
 void setCollectFineGrainedPoolStatistics(User user, boolean value)
           
 void setConnectionLimit(int value)
           
 void setConnectionPoolCleanupInterval(User user, int poolCleanupInterval)
           
 void setConnectionPoolEnabled(User user, boolean enabled)
           
 void setConnectionTimeout(int timeout)
          Sets the connection timeout in ms
 void setLoggingLevel(ch.qos.logback.classic.Level level)
           
 void setLoggingOn(UUID clientID, boolean status)
          Sets the logging status for the given connection
 void setMaintenanceInterval(int interval)
           
 void setMaximumConnectionPoolSize(User user, int value)
           
 void setMaximumPoolCheckOutTime(User user, int value)
           
 void setMaximumPoolRetryWaitPeriod(User user, int value)
           
 void setMinimumConnectionPoolSize(User user, int value)
           
 void setPoolConnectionThreshold(User user, int value)
           
 void setPooledConnectionTimeout(User user, int timeout)
           
 void setWarningTimeThreshold(int threshold)
           
 void shutdown()
          Shuts down the server
 

Method Detail

shutdown

void shutdown()
              throws RemoteException
Shuts down the server

Throws:
RemoteException - in case of a communication error

getStartDate

long getStartDate()
                  throws RemoteException
Returns:
the server startup date
Throws:
RemoteException - in case of a communication error

getDatabaseURL

String getDatabaseURL()
                      throws RemoteException
Returns:
the database URL
Throws:
RemoteException - in case of a communication error

getServerName

String getServerName()
                     throws RemoteException
Returns:
the server name
Throws:
RemoteException - in case of a communication error

getServerPort

int getServerPort()
                  throws RemoteException
Returns:
the server port
Throws:
RemoteException - in case of a communication error

getServerDbPort

int getServerDbPort()
                    throws RemoteException
Returns:
the port on which db connections are created
Throws:
RemoteException - in case of a communication error

getConnectionCount

int getConnectionCount()
                       throws RemoteException
Returns:
the number of active connections
Throws:
RemoteException - in case of a communication error

getConnectionLimit

int getConnectionLimit()
                       throws RemoteException
Returns:
the maximum number of concurrent connections this servers accepts
Throws:
RemoteException - in case of a communication error

setConnectionLimit

void setConnectionLimit(int value)
                        throws RemoteException
Parameters:
value - the maximum number of concurrent connections this servers accepts
Throws:
RemoteException - in case of a communication error

getMaintenanceInterval

int getMaintenanceInterval()
                           throws RemoteException
Returns:
the number of ms that should pass between maintenance cycles, that is, when inactive clients are purged
Throws:
RemoteException - in case of a communication error

setMaintenanceInterval

void setMaintenanceInterval(int interval)
                            throws RemoteException
Parameters:
interval - the number of ms that should pass between maintenance cycles, that is, when inactive clients are purged
Throws:
RemoteException - in case of a communication error

getServerLog

ServerLog getServerLog(UUID clientID)
                       throws RemoteException
Parameters:
clientID - the ID of the client for which to retrieve the log
Returns:
the log for the given connection
Throws:
RemoteException - in case of a communication error

getActiveConnectionCount

int getActiveConnectionCount()
                             throws RemoteException
Returns:
the number of active connections
Throws:
RemoteException - in case of a communication error

isLoggingOn

boolean isLoggingOn(UUID clientID)
                    throws RemoteException
Returns true if logging is enabled for the given connection

Parameters:
clientID - the ID of the client
Returns:
true if logging is on for the given connection
Throws:
RemoteException - in case of a communication error

setLoggingOn

void setLoggingOn(UUID clientID,
                  boolean status)
                  throws RemoteException
Sets the logging status for the given connection

Parameters:
clientID - the ID of the client
status - the new logging status
Throws:
RemoteException - in case of a communication error

getMemoryUsage

String getMemoryUsage()
                      throws RemoteException
Returns:
a string containing memory usage information
Throws:
RemoteException - in case of a communication error

getAllocatedMemory

long getAllocatedMemory()
                        throws RemoteException
Returns:
the total amount of memory allocated by the server process
Throws:
RemoteException - in case of a communication error

getUsedMemory

long getUsedMemory()
                   throws RemoteException
Returns:
the amount of memory being used by the server process
Throws:
RemoteException - in case of a communication error

getMaxMemory

long getMaxMemory()
                  throws RemoteException
Returns:
the maximum amount of memory available to the server process
Throws:
RemoteException - in case of a communication error

performGC

void performGC()
               throws RemoteException
Performs garbage collection

Throws:
RemoteException - in case of a communication error

disconnect

void disconnect(UUID clientID)
                throws RemoteException
Unregisters the connection from the server, if connection pooling is enabled for the user the connection is pooled.

Parameters:
clientID - the ID of the client
Throws:
RemoteException - in case of a communication error

getLoggingLevel

ch.qos.logback.classic.Level getLoggingLevel()
                                             throws RemoteException
Returns:
the server logging level
Throws:
RemoteException - in case of a communication error

setLoggingLevel

void setLoggingLevel(ch.qos.logback.classic.Level level)
                     throws RemoteException
Parameters:
level - the logging level
Throws:
RemoteException - in case of a communication error

getUsers

Collection<User> getUsers()
                          throws RemoteException
Returns:
the users currently connected to the server
Throws:
RemoteException - in case of a communication error

getClients

Collection<ClientInfo> getClients()
                                  throws RemoteException
Returns:
the info on all clients connected to the server
Throws:
RemoteException - in case of a communication error

getClients

Collection<ClientInfo> getClients(User user)
                                  throws RemoteException
Parameters:
user - the user for which to retrieve the client infos
Returns:
the connection keys associated with the given user
Throws:
RemoteException - in case of a communication error

getClients

Collection<ClientInfo> getClients(String clientTypeID)
                                  throws RemoteException
Parameters:
clientTypeID - the client type for which to retrieve the client infos
Returns:
the connection keys associated with the given user
Throws:
RemoteException - in case of a communication error

getConnectionTimeout

int getConnectionTimeout()
                         throws RemoteException
Returns the connection timeout in ms

Returns:
the connection timeout in ms
Throws:
RemoteException - in case of a communication error

setConnectionTimeout

void setConnectionTimeout(int timeout)
                          throws RemoteException
Sets the connection timeout in ms

Parameters:
timeout - the timeout in ms
Throws:
RemoteException - in case of a communication error

getClientTypes

Collection<String> getClientTypes()
                                  throws RemoteException
Returns:
the identifiers of the client types connected to the server
Throws:
RemoteException - in case of an exception

getEnabledConnectionPools

List<User> getEnabledConnectionPools()
                                     throws RemoteException
Returns:
a list of the usernames behind the active connection pools
Throws:
RemoteException - in case of an exception

getConnectionPoolStatistics

ConnectionPoolStatistics getConnectionPoolStatistics(User user,
                                                     long since)
                                                     throws RemoteException
Parameters:
user - the pool user
since - the time since from which to retrieve pool statistics
Returns:
the pool statistics
Throws:
RemoteException - in case of an exception

getDatabaseStatistics

Database.Statistics getDatabaseStatistics()
                                          throws RemoteException
Returns:
usage statistics for the underlying database
Throws:
RemoteException - in case of an exception

getRequestsPerSecond

int getRequestsPerSecond()
                         throws RemoteException
Returns:
the number of service requests per second
Throws:
RemoteException - in case of an exception

getWarningTimeThreshold

int getWarningTimeThreshold()
                            throws RemoteException
Returns:
the request warning time threshold in ms
Throws:
RemoteException - in case of an exception

setWarningTimeThreshold

void setWarningTimeThreshold(int threshold)
                             throws RemoteException
Parameters:
threshold - the request warning time threshold in ms
Throws:
RemoteException - in case of an exception

getWarningTimeExceededPerSecond

int getWarningTimeExceededPerSecond()
                                    throws RemoteException
Returns:
the number of service requests exceeding the warning time
Throws:
RemoteException - in case of an exception
See Also:
setWarningTimeThreshold(int)

removeConnections

void removeConnections(boolean inactiveOnly)
                       throws RemoteException
Removes connections.

Parameters:
inactiveOnly - if true, only inactive connections are removed
Throws:
RemoteException - in case of an exception

resetConnectionPoolStatistics

void resetConnectionPoolStatistics(User user)
                                   throws RemoteException
Resets the statistics that have been collected so far

Parameters:
user - the pool user
Throws:
RemoteException - in case of an exception

isCollectFineGrainedPoolStatistics

boolean isCollectFineGrainedPoolStatistics(User user)
                                           throws RemoteException
Parameters:
user - the pool user
Returns:
true if fine grained statistics should be collected for the given connection pool
Throws:
RemoteException - in case of an exception

setCollectFineGrainedPoolStatistics

void setCollectFineGrainedPoolStatistics(User user,
                                         boolean value)
                                         throws RemoteException
Parameters:
user - the pool user
value - true if fine grained statistics should be collected for the given connection pool
Throws:
RemoteException - in case of an exception

getSystemProperties

String getSystemProperties()
                           throws RemoteException
Returns:
the server system properties
Throws:
RemoteException - in case of an exception

loadDomainModel

void loadDomainModel(URI location,
                     String domainClassName)
                     throws RemoteException,
                            ClassNotFoundException,
                            IllegalAccessException
Loads the domain model found int he given class, at the given location

Parameters:
location - the classpath URI
domainClassName - the domain class name
Throws:
RemoteException - in case of an exception
ClassNotFoundException - in case the domain class in not found
IllegalAccessException - in case the class loader access is denied

getEntityDefinitions

Map<String,String> getEntityDefinitions()
                                        throws RemoteException
Returns:
a map containing all entityIDs, with their respective table names as an associated value
Throws:
RemoteException - in case of an exception

getConnectionPoolCleanupInterval

int getConnectionPoolCleanupInterval(User user)
                                     throws RemoteException
Parameters:
user - the pool user
Returns:
the pool cleanup interval in ms
Throws:
RemoteException - in case of an exception

setConnectionPoolCleanupInterval

void setConnectionPoolCleanupInterval(User user,
                                      int poolCleanupInterval)
                                      throws RemoteException
Parameters:
user - the pool user
poolCleanupInterval - the pool cleanup interval in ms
Throws:
RemoteException - in case of an exception

isConnectionPoolEnabled

boolean isConnectionPoolEnabled(User user)
                                throws RemoteException
Parameters:
user - the pool user
Returns:
the pool enabled status
Throws:
RemoteException - in case of an exception

setConnectionPoolEnabled

void setConnectionPoolEnabled(User user,
                              boolean enabled)
                              throws RemoteException
Parameters:
user - the pool user
enabled - the pool enabled status
Throws:
RemoteException - in case of an exception

getPooledConnectionTimeout

int getPooledConnectionTimeout(User user)
                               throws RemoteException
Parameters:
user - the pool user
Returns:
the pooled connection timeout in ms
Throws:
RemoteException - in case of an exception

setPooledConnectionTimeout

void setPooledConnectionTimeout(User user,
                                int timeout)
                                throws RemoteException
Parameters:
user - the pool user
timeout - the pooled connection timeout in ms
Throws:
RemoteException - in case of an exception

getMaximumPoolRetryWaitPeriod

int getMaximumPoolRetryWaitPeriod(User user)
                                  throws RemoteException
Parameters:
user - the pool user
Returns:
the maximum time to wait between check out retries in ms
Throws:
RemoteException - in case of an exception

setMaximumPoolRetryWaitPeriod

void setMaximumPoolRetryWaitPeriod(User user,
                                   int value)
                                   throws RemoteException
Parameters:
user - the pool user
value - the maximum time to wait between check out retries in ms
Throws:
RemoteException - in case of an exception

getMaximumPoolCheckOutTime

int getMaximumPoolCheckOutTime(User user)
                               throws RemoteException
Parameters:
user - the pool user
Returns:
the maximum time in ms to retry checking out a connection before throwing an exception
Throws:
RemoteException - in case of an exception

setMaximumPoolCheckOutTime

void setMaximumPoolCheckOutTime(User user,
                                int value)
                                throws RemoteException
Parameters:
user - the pool user
value - the maximum time in ms to retry checking out a connection before throwing an exception
Throws:
RemoteException - in case of an exception

getMaximumConnectionPoolSize

int getMaximumConnectionPoolSize(User user)
                                 throws RemoteException
Parameters:
user - the pool user
Returns:
the maximum connection pool size
Throws:
RemoteException - in case of an exception

setMaximumConnectionPoolSize

void setMaximumConnectionPoolSize(User user,
                                  int value)
                                  throws RemoteException
Parameters:
user - the pool user
value - the maximum connection pool size
Throws:
RemoteException - in case of an exception

getMinimumConnectionPoolSize

int getMinimumConnectionPoolSize(User user)
                                 throws RemoteException
Parameters:
user - the pool user
Returns:
the minimum connection pool size
Throws:
RemoteException - in case of an exception

setMinimumConnectionPoolSize

void setMinimumConnectionPoolSize(User user,
                                  int value)
                                  throws RemoteException
Parameters:
user - the pool user
value - the minimum connection pool size
Throws:
RemoteException - in case of an exception

getPoolConnectionThreshold

int getPoolConnectionThreshold(User user)
                               throws RemoteException
Throws:
RemoteException

setPoolConnectionThreshold

void setPoolConnectionThreshold(User user,
                                int value)
                                throws RemoteException
Throws:
RemoteException