ConnectionHandlersMonitoringTableModel.java revision 998747bfaaa3c6b28bbfaf0e282e6c0ccbf46bc0
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at legal-notices/CDDLv1_0.txt.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information:
* Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*
*
* Copyright 2009 Sun Microsystems, Inc.
* Portions Copyright 2014-2015 ForgeRock AS
*/
/**
* The table model used to display the monitoring information of connection
* handlers.
*/
public class ConnectionHandlersMonitoringTableModel extends
{
private static final long serialVersionUID = -8891998773191495L;
/** {@inheritDoc} */
{
{
{
}
else
{
{
}
}
}
return newAddresses;
}
/** {@inheritDoc} */
{
if (result == 0)
{
for (int i : possibleResults)
{
if (i != 0)
{
result = i;
break;
}
}
}
if (!isSortAscending())
{
}
return result;
}
{
{
}
}
/**
* Returns whether two addresses are equal.
*
* @param address1
* the first address
* @param address2
* the second address
* @return true if both are equal, false otherwise
*/
{
{
}
}
/** {@inheritDoc} */
protected CustomSearchResult getMonitoringEntry(
{
return ach.getMonitoringEntry();
}
/** {@inheritDoc} */
{
{
}
else
{
{
}
else
{
}
switch (ch.getProtocol())
{
case OTHER:
break;
default:
break;
}
}
}
{
{
{
{
return sr;
}
{
return sr;
}
}
}
return null;
}
/** {@inheritDoc} */
protected LocalizableMessage getNameHeader()
{
return INFO_CTRL_PANEL_CONNECTION_HANDLER_HEADER.get();
}
}
/**
* The table model has one line per address, this object represents that
* address and all the associated monitoring information.
*
*/
{
private ConnectionHandlerDescriptor ch;
private InetAddress address;
private CustomSearchResult monitoringEntry;
private int hashCode;
/**
* Constructor of this data structure.
* @param ch the connection handler descriptor.
* @param address the address.
* @param monitoringEntry the monitoringEntry.
*/
{
this.monitoringEntry = monitoringEntry;
{
}
else
{
}
}
/**
* Returns the address.
* @return the address.
*/
public InetAddress getAddress()
{
return address;
}
/**
* Returns the connection handler descriptor.
* @return the connection handler descriptor.
*/
{
return ch;
}
/**
* Returns the monitoring entry.
* @return the monitoring entry.
*/
public CustomSearchResult getMonitoringEntry()
{
return monitoringEntry;
}
/** {@inheritDoc} */
public int hashCode()
{
return hashCode;
}
/** {@inheritDoc} */
{
if (o != this)
{
return true;
}
if (!(o instanceof AddressConnectionHandlerDescriptor))
{
return false;
}
}
}