java.lang.Object
net.i2p.router.JobImpl
net.i2p.router.client.ReportAbuseJob
- All Implemented Interfaces:
Job
Async job to send an abuse message to the client.
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final DestinationDestination being reported for abuse.private final LogLog for this job.private final StringDescription of the abuse reason.private final ClientConnectionRunnerClient connection to send the abuse report to.private final intSeverity level of the abuse report.Constructor Summary
ConstructorsConstructorDescriptionReportAbuseJob(RouterContext context, ClientConnectionRunner runner, Destination dest, String reason, int severity) Create abuse report.Method Summary
All MethodsMethods inherited from class JobImpl
dropped, getContext, getJobId, getMadeReadyOn, getTiming, madeReady, requeue, toStringModifier and TypeMethodDescriptionvoiddropped()Default implementation does nothing.final RouterContextThe router context that this job belongs to.longgetJobId()The unique job ID for this job.longThe timestamp when this job was last made ready for execution.The timing object for this job.voidmadeReady(long now) For JobQueue only, not for external use.protected voidrequeue(long delayMs) Requeue this job to run after the specified delay.toString()
Field Details
_log
Log for this job._runner
Client connection to send the abuse report to._dest
Destination being reported for abuse._reason
Description of the abuse reason._severity
private final int _severitySeverity level of the abuse report.
Constructor Details
ReportAbuseJob
public ReportAbuseJob(RouterContext context, ClientConnectionRunner runner, Destination dest, String reason, int severity) Create abuse report.- Parameters:
context- the router context, whose log manager supplies this job's loggerrunner- the client connection the report will be sent todest- the destination being reported, used to look up the session to report toreason- the human-readable description of the abuseseverity- the numeric abuse severity level to report, 0-255
Method Details
getName
runJob
public void runJob()Execute the job.