com.kolibrifx.plovercrest.server.security.ClientInfo Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of plovercrest-server Show documentation
Show all versions of plovercrest-server Show documentation
Plovercrest server library.
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 + "]";
}
}