All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.genexus.management.LocalUserInformationJMX Maven / Gradle / Ivy

Go to download

Core classes for the runtime used by Java and Android apps generated with GeneXus

There is a newer version: 4.7.3
Show newest version
package com.genexus.management;

import java.util.Date;

import com.genexus.db.LocalUserInformation;

public class LocalUserInformationJMX implements LocalUserInformationJMXMBean{

  LocalUserInformation localUserInfo;

  public LocalUserInformationJMX(LocalUserInformation localUserInfo)
  {
    this.localUserInfo = localUserInfo;
  }

  static public void CreateLocalUserInformationJMX(LocalUserInformation localUserInfo)
  {
    try
    {
      MBeanUtils.createMBean(localUserInfo);
    }
    catch(Exception e)
    {
      System.err.println("Cannot register User Information MBean."+e.toString());
    }
  }
  
  static public void DestroyLocalUserInformationJMX(LocalUserInformation localUserInfo)
  {
    try
    {
      MBeanUtils.destroyMBean(localUserInfo);
    }
    catch(Exception e)
    {
      System.err.println("Cannot destroy User Information MBean."+e.toString());
    }
  }  

  public int getId()
  {
	  return localUserInfo.getHandle();
  }
    
  public String getLastSQLStatement()
  {
	  return localUserInfo.getLastSQL();
  }
  
	public String getLastObject()
	{
		return localUserInfo.getLastObjectExecuted();
	}   
  
  public Date getLastSQLStatementTime()
  {
	  return localUserInfo.getLastSQLDateTime();
  }  
  
  public boolean getWaitingForConnection()
  {
	  return localUserInfo.getWaitingForConnection();
  }
  
  public Date getWaitingForConnectionTime()
  {
	  return localUserInfo.getWaitingForConnectionSince();
  }
  
  public int getLastConnectionId()
  {
	  return localUserInfo.getLastConnectionUsed();
  }  
  
  public void disconnect()
  {
	  localUserInfo.disconnectUser();
  }  
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy