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

com.kolibrifx.plovercrest.server.security.ClientInfo Maven / Gradle / Ivy

The newest version!
/*
 * Copyright (c) 2010-2017, KolibriFX AS. Licensed under the Apache License, version 2.0.
 */

package com.kolibrifx.plovercrest.server.security;

import java.net.InetSocketAddress;

/**
 * Information about a specific plovercrest client, passed to {@link AccessControlFilter}.
 */
public class ClientInfo {
    private final InetSocketAddress address;
    private final String context;

    public ClientInfo(final InetSocketAddress address, final String context) {
        this.address = address;
        this.context = context;
    }

    /**
     * The socket address (IP address and port).
     */
    public InetSocketAddress getAddress() {
        return address;
    }

    /**
     * A context string specified by
     * {@link com.kolibrifx.plovercrest.client.remote.PlovercrestRemoteBuilder#clientContext(String)}
     * , or an empty string.
     */
    public String getContext() {
        return context;
    }

    @Override
    public String toString() {
        return "ClientInfo [address=" + address + ", context=" + context + "]";
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy