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

com.viaoa.sync.model.ClientInfo Maven / Gradle / Ivy

The newest version!
/*  Copyright 1999 Vince Via [email protected]
    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
*/
package com.viaoa.sync.model;

import java.io.Serializable;

import com.viaoa.util.OADateTime;

/**
 * Information about a single instance of a Client.
 */
public class ClientInfo implements Serializable{
    private static final long serialVersionUID = 1L;

    protected int connectionId = -1;
    protected OADateTime created;
    protected OADateTime disconnected;

    protected volatile boolean started;
    protected String hostName;
    protected String ipAddress;

    protected String serverHostName;
    protected int serverHostPort;
    
    protected volatile int totalRequests;
    protected volatile long totalRequestTime; // nanoseconds

    protected String userId;
    protected String userName;
    protected String location;
    
    protected long totalMemory;
    protected long freeMemory;
    protected String version;
    protected int remoteThreadCount;
    
    public ClientInfo() {
    }
    
    public OADateTime getCreated() {
        return created;
    }
    public void setCreated(OADateTime newValue) {
        this.created = newValue;
    }
    
    public String getIpAddress() {
        return ipAddress;
    }
    public void setIpAddress(String newValue) {
        this.ipAddress = newValue;
    }
    
    public String getHostName() {
        return hostName;
    }
    public void setHostName(String newValue) {
        this.hostName = newValue;
    }
    
    public int getConnectionId() {
        return connectionId;
    }
    public void setConnectionId(int connectionId) {
        this.connectionId = connectionId;
    }

    public OADateTime getDisconnected() {
        return disconnected;
    }
    public void setDisconnected(OADateTime disconnected) {
        this.disconnected = disconnected;
    }
    
    public int getTotalRequests() {
        return totalRequests;
    }
    public void setTotalRequests(int totalRequests) {
        this.totalRequests = totalRequests;
    }
    public void incrementTotalRequests() {
        this.totalRequests++;
    }
    public long getTotalRequestTime() {
        return totalRequestTime;
    }
    public void setTotalRequestTime(long totalRequestTime) {
        this.totalRequestTime = totalRequestTime;
    }
    public void incrementTotalRequestTime(long nsTime) {
        this.totalRequestTime += nsTime;
    }


    public String getServerHostName() {
        return serverHostName;
    }
    public void setServerHostName(String gsmrServerHostName) {
        this.serverHostName = gsmrServerHostName;
    }

    public int getServerHostPort() {
        return serverHostPort;
    }
    public void setServerHostPort(int gsmrServerHostPort) {
        this.serverHostPort = gsmrServerHostPort;
    }

        
    public int getRemoteThreadCount() {
        return remoteThreadCount;
    }
    public void setRemoteThreadCount(int remoteThreadCount) {
        this.remoteThreadCount = remoteThreadCount;
    }
    
    public boolean isStarted() {
        return started;
    }
    public void setStarted(boolean started) {
        this.started = started;
    }

    public String getUserId() {
        return userId;
    }
    public void setUserId(String user) {
        this.userId = user;
    }
    public String getUserName() {
        return userName;
    }
    public void setUserName(String user) {
        this.userName = user;
    }
    public String getLocation() {
        return location;
    }
    public void setLocation(String loc) {
        this.location = loc;
    }
    public long getTotalMemory() {
        return totalMemory;
    }
    public void setTotalMemory(long totalMemory) {
        this.totalMemory = totalMemory;
    }
    public long getFreeMemory() {
        return freeMemory;
    }
    public void setFreeMemory(long freeMemory) {
        this.freeMemory = freeMemory;
    }

    public String getVersion() {
        return version;
    }
    public void setVersion(String newValue) {
        this.version = newValue;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy