Class LoginAddress

java.lang.Object
org.deltava.beans.DatabaseBean
org.deltava.beans.system.LoginAddress
All Implemented Interfaces:
Serializable, Comparable<Object>, IDBean, RemoteAddressBean, Cacheable

public class LoginAddress extends DatabaseBean implements RemoteAddressBean
A bean to store Login address information for a user.
Since:
1.0
Version:
10.2
Author:
Luke
See Also:
  • Constructor Details

    • LoginAddress

      public LoginAddress(int id)
      Initializes the bean.
      Parameters:
      id - the database ID of the user
  • Method Details

    • getRemoteAddr

      public String getRemoteAddr()
      Description copied from interface: RemoteAddressBean
      Returns the remote IP address.
      Specified by:
      getRemoteAddr in interface RemoteAddressBean
      Returns:
      an IPv4 or IPv6 address
    • getRemoteHost

      public String getRemoteHost()
      Description copied from interface: RemoteAddressBean
      Returns the remote host name.
      Specified by:
      getRemoteHost in interface RemoteAddressBean
      Returns:
      the host name, or address if unresolved
    • getLoginCount

      public int getLoginCount()
      Returns the number of logins by this user from this address.
      Returns:
      the number of logins
      See Also:
    • setRemoteAddr

      public void setRemoteAddr(String addr)
      Updates the IP address used to log in.
      Parameters:
      addr - the IP address
      See Also:
    • setRemoteHost

      public void setRemoteHost(String host)
      Updates the host name used to log in.
      Parameters:
      host - the host name
      See Also:
    • setLoginCount

      public void setLoginCount(int logins)
      Updates the number of logins by this user from this address.
      Parameters:
      logins - the number of logins
      Throws:
      IllegalArgumentException - if logins is negative
      See Also: