![JAR search and dependency download from the Maven repository](/logo.png)
net.intelie.live.plugins.messenger.connections.UserConnection Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of plugin-messenger Show documentation
Show all versions of plugin-messenger Show documentation
Intelie Live Messenger Plugin
The newest version!
package net.intelie.live.plugins.messenger.connections;
import net.intelie.live.plugins.messenger.data.UserData;
import java.util.Objects;
public class UserConnection {
private final boolean isSuperUser;
private final UserData user;
private final String host;
public UserConnection(String host, UserData user, boolean isSuperUser) {
this.user = user;
this.host = host;
this.isSuperUser = isSuperUser;
}
public Integer getUserId() {
return user == null ? null : user.getId();
}
public String getUserName() {
return user == null ? null : user.getName();
}
public boolean isSuperUser() {
return this.isSuperUser;
}
public UserData userData() {
return this.user;
}
@Override
public boolean equals(Object o) {
if (!(o instanceof UserConnection)) return false;
UserConnection that = (UserConnection) o;
return Objects.equals(this.user, that.user)
&& Objects.equals(this.host, that.host);
}
@Override
public int hashCode() {
return Objects.hash(user, host);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy