public abstract class ServeErrors
extends java.lang.Object
Constructor and Description |
---|
ServeErrors() |
Modifier and Type | Method and Description |
---|---|
protected abstract <T extends Payload> |
createProtocolP2PPacket(T payload)
Create packets
|
protected <T extends ProtocolP2PPacket<?>> |
sendEmptyDirectory(T pd)
Send an empty directory message.
|
protected <T extends ProtocolP2PPacket<?>> |
sendEmptyFile(T pd)
Send an empty file message.
|
protected <T extends ProtocolP2PPacket<?>> |
sendInternalError(T pd)
Send an internal error message.
|
protected <T extends ProtocolP2PPacket<?>> |
sendNotATracker(T pd)
Send a NotATracker error message.
|
protected <T extends ProtocolP2PPacket<?>> |
sendNotFound(T pd)
Send a not found message.
|
protected <T extends ProtocolP2PPacket<?>> |
sendUnknownHost(T pd)
Send an unknown host message.
|
protected abstract void |
writeLog(java.lang.Exception e,
LogLevel logLevel)
Implementation of writeLog
|
protected abstract void |
writeLog(java.lang.String text,
LogLevel logLevel)
Implementation of writeLog
|
protected abstract void writeLog(java.lang.String text, LogLevel logLevel)
text
- Text to loglogLevel
- level of loggingprotected abstract void writeLog(java.lang.Exception e, LogLevel logLevel)
e
- exception to loglogLevel
- level of loggingprotected abstract <T extends Payload> ProtocolP2PPacket<?> createProtocolP2PPacket(T payload)
payload
- Payloadprotected <T extends ProtocolP2PPacket<?>> void sendNotATracker(T pd)
pd
- Request receivedprotected <T extends ProtocolP2PPacket<?>> void sendInternalError(T pd)
pd
- Request receivedprotected <T extends ProtocolP2PPacket<?>> void sendNotFound(T pd)
pd
- Request receivedprotected <T extends ProtocolP2PPacket<?>> void sendEmptyDirectory(T pd)
pd
- Request receivedprotected <T extends ProtocolP2PPacket<?>> void sendEmptyFile(T pd)
pd
- Request receivedprotected <T extends ProtocolP2PPacket<?>> void sendUnknownHost(T pd)
pd
- Request received