public class Banlist extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Banlist.Entry |
Modifier and Type | Field and Description |
---|---|
static long |
BANLIST_CLEANER_START_DELAY |
static long |
BANLIST_DURATION_FOREVER |
static long |
BANLIST_DURATION_MAX |
static long |
BANLIST_DURATION_MS
Don't make this too long as the failure may be transient
due to connection limits.
|
static long |
BANLIST_DURATION_PARTIAL |
Constructor and Description |
---|
Banlist(RouterContext context) |
Modifier and Type | Method and Description |
---|---|
boolean |
banlistRouter(Hash peer) |
boolean |
banlistRouter(Hash peer,
String reason) |
boolean |
banlistRouter(Hash peer,
String reason,
String transport) |
boolean |
banlistRouter(Hash peer,
String reason,
String transport,
boolean forever) |
boolean |
banlistRouter(Hash peer,
String reason,
String reasonCode,
String transport,
long expireOn)
So that we may specify an expiration
|
boolean |
banlistRouter(String reasonCode,
Hash peer,
String reason)
ick have to put the reasonCode in the front to avoid ambiguity
|
boolean |
banlistRouterForever(Hash peer,
String reason) |
boolean |
banlistRouterForever(Hash peer,
String reason,
String reasonCode) |
Map<Hash,Banlist.Entry> |
getEntries()
For BanlistRenderer in router console.
|
int |
getRouterCount() |
boolean |
isBanlisted(Hash peer) |
boolean |
isBanlisted(Hash peer,
String transport) |
boolean |
isBanlistedForever(Hash peer) |
void |
renderStatusHTML(Writer out)
Deprecated.
moved to router console
|
void |
unbanlistRouter(Hash peer) |
void |
unbanlistRouter(Hash peer,
String transport) |
public static final long BANLIST_DURATION_MS
public static final long BANLIST_DURATION_MAX
public static final long BANLIST_DURATION_PARTIAL
public static final long BANLIST_DURATION_FOREVER
public static final long BANLIST_CLEANER_START_DELAY
public Banlist(RouterContext context)
public int getRouterCount()
public Map<Hash,Banlist.Entry> getEntries()
public boolean banlistRouter(Hash peer)
public boolean banlistRouter(String reasonCode, Hash peer, String reason)
public boolean banlistRouterForever(Hash peer, String reason, String reasonCode)
public boolean banlistRouter(Hash peer, String reason, String transport, boolean forever)
public boolean banlistRouter(Hash peer, String reason, String reasonCode, String transport, long expireOn)
reason
- may be nullreasonCode
- may be nullexpireOn
- absolute time, not a durationtransport
- may be nullpublic void unbanlistRouter(Hash peer)
public boolean isBanlisted(Hash peer)
public boolean isBanlistedForever(Hash peer)
@Deprecated public void renderStatusHTML(Writer out) throws IOException
IOException