Class Set
- java.lang.Object
-
- com.aoindustries.aoserv.client.AOServObject<K,T>
-
- com.aoindustries.aoserv.client.CachedObject<Integer,V>
-
- com.aoindustries.aoserv.client.CachedObjectIntegerKey<Set>
-
- com.aoindustries.aoserv.client.net.reputation.Set
-
- All Implemented Interfaces:
Streamable,StreamReadable,StreamWritable,Row,AOServReadable,AOServStreamable,AOServWritable,SingleTableObject<Integer,Set>
public final class Set extends CachedObjectIntegerKey<Set>
AnIpReputationSetstores network and host IP reputation fed from external sources.- Author:
- AO Industries, Inc.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSet.AddReputationstatic classSet.ConfidenceTypestatic classSet.ReputationType
-
Field Summary
-
Fields inherited from class com.aoindustries.aoserv.client.CachedObjectIntegerKey
pkey
-
Fields inherited from class com.aoindustries.aoserv.client.CachedObject
table
-
Fields inherited from class com.aoindustries.aoserv.client.AOServObject
USE_ARRAY_OF_DOMAIN, USE_SQL_DATA, USE_SQL_DATA_WRITE
-
-
Constructor Summary
Constructors Constructor Description Set()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddReputation(int host, Set.ConfidenceType confidence, Set.ReputationType reputationType, short score)voidaddReputation(Collection<Set.AddReputation> addReputations)AccountgetAccount()May be filtered.Account.NamegetAccount_name()booleangetAllowSubaccountUse()Allows sub accounts to use this set.protected ObjectgetColumnImpl(int i)intgetHostDecayInterval()Gets the number of seconds between each host reputation decay.List<Host>getHosts()StringgetIdentifier()Gets the system-wide unique identifier for this reputation set.UnmodifiableTimestampgetLastHostDecay()Gets the last time the hosts were decayed.UnmodifiableTimestampgetLastNetworkDecay()Gets the last time the networks were decayed.UnmodifiableTimestampgetLastReputationAdded()Gets the last time reputation was added.shortgetMaxDefiniteReputation()Gets the maximum definite reputation score for a host.intgetMaxHosts()Gets the maximum number of individual hosts that will be tracked.shortgetMaxNetworkReputation()Gets the maximum reputation score for a network.shortgetMaxUncertainReputation()Gets the maximum uncertain reputation score for a host.intgetNetworkDecayInterval()Gets the number of seconds between each network reputation decay.shortgetNetworkPrefix()Gets the network prefix size, such as 24 for a /24 (class C) network.List<Network>getNetworks()Table.TableIDgetTableID()voidinit(ResultSet result)Initializes this object from the raw database contents.voidread(StreamableInput in, AoservProtocol.Version protocolVersion)voidwrite(StreamableOutput out, AoservProtocol.Version protocolVersion)-
Methods inherited from class com.aoindustries.aoserv.client.CachedObjectIntegerKey
equals, getKey, getPkey, hashCode, toStringImpl
-
Methods inherited from class com.aoindustries.aoserv.client.CachedObject
getTable, setTable
-
Methods inherited from class com.aoindustries.aoserv.client.AOServObject
compare, compare, compare, compare, compareIgnoreCaseConsistentWithEquals, compareTo, compareTo, compareTo, getAccountingCode, getColumn, getColumns, getColumns, getDomainLabel, getDomainLabels, getDomainName, getDto, getEmail, getGecos, getGroupId, getHashedKey, getHashedPassword, getHostname, getInetAddress, getLinuxID, getLinuxUserName, getMacAddress, getMySQLDatabaseName, getMySQLServerName, getMysqlUserName, getPort, getPostgresDatabaseName, getPostgresServerName, getPostgresUserId, getTableSchema, getTimeMillis, getTimeMillis, getUnixPath, getUserId, read, toString, write
-
-
-
-
Method Detail
-
getTableID
public Table.TableID getTableID()
- Specified by:
getTableIDin classAOServObject<Integer,Set>
-
init
public void init(ResultSet result) throws SQLException
Description copied from class:AOServObjectInitializes this object from the raw database contents.- Specified by:
initin classAOServObject<Integer,Set>- Parameters:
result- theResultSetcontaining the row to copy into this object- Throws:
SQLException
-
write
public void write(StreamableOutput out, AoservProtocol.Version protocolVersion) throws IOException
- Specified by:
writein interfaceAOServStreamable- Specified by:
writein interfaceAOServWritable- Specified by:
writein classAOServObject<Integer,Set>- Throws:
IOException
-
read
public void read(StreamableInput in, AoservProtocol.Version protocolVersion) throws IOException
- Specified by:
readin interfaceAOServReadable- Specified by:
readin interfaceAOServStreamable- Specified by:
readin classAOServObject<Integer,Set>- Throws:
IOException
-
getColumnImpl
protected Object getColumnImpl(int i)
- Specified by:
getColumnImplin classAOServObject<Integer,Set>
-
getAccount_name
public Account.Name getAccount_name()
-
getAccount
public Account getAccount() throws SQLException, IOException
May be filtered.- Throws:
SQLExceptionIOException
-
getIdentifier
public String getIdentifier()
Gets the system-wide unique identifier for this reputation set.
-
getAllowSubaccountUse
public boolean getAllowSubaccountUse()
Allows sub accounts to use this set. They cannot see the set hosts and networks.
-
getMaxHosts
public int getMaxHosts()
Gets the maximum number of individual hosts that will be tracked.
-
getMaxUncertainReputation
public short getMaxUncertainReputation()
Gets the maximum uncertain reputation score for a host.
-
getMaxDefiniteReputation
public short getMaxDefiniteReputation()
Gets the maximum definite reputation score for a host.
-
getNetworkPrefix
public short getNetworkPrefix()
Gets the network prefix size, such as 24 for a /24 (class C) network.
-
getMaxNetworkReputation
public short getMaxNetworkReputation()
Gets the maximum reputation score for a network.
-
getHostDecayInterval
public int getHostDecayInterval()
Gets the number of seconds between each host reputation decay.
-
getLastHostDecay
public UnmodifiableTimestamp getLastHostDecay()
Gets the last time the hosts were decayed.
-
getNetworkDecayInterval
public int getNetworkDecayInterval()
Gets the number of seconds between each network reputation decay.
-
getLastNetworkDecay
public UnmodifiableTimestamp getLastNetworkDecay()
Gets the last time the networks were decayed.
-
getLastReputationAdded
public UnmodifiableTimestamp getLastReputationAdded()
Gets the last time reputation was added.
-
getHosts
public List<Host> getHosts() throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
getNetworks
public List<Network> getNetworks() throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
addReputation
public void addReputation(int host, Set.ConfidenceType confidence, Set.ReputationType reputationType, short score) throws IOException, SQLException- Throws:
IOExceptionSQLException
-
addReputation
public void addReputation(Collection<Set.AddReputation> addReputations) throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
-