net.zortrium.p2proto
Class PeerException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.io.IOException
net.zortrium.p2proto.PeerException
- All Implemented Interfaces:
- Serializable
- Direct Known Subclasses:
- PeerErrorException, PeerTimeoutException
public class PeerException
- extends IOException
Base class for exceptions resulting from requests sent to remote peers.
- Author:
- Sean Barker - www.zortrium.net
- See Also:
- Serialized Form
PeerException
public PeerException(String message,
InetAddress peer,
Msg request)
- Construct a new exception for the given host and query message.
- Parameters:
message - The exception detail message.peer - The host from which the response was not received.request - The query message that received no response.
getPeer
public InetAddress getPeer()
- Get the host that caused the error.
- Returns:
- The host that caused the exception to be thrown.
getRequest
public Msg getRequest()
- Get the request message that resulted in the error.
- Returns:
- The request message previously sent to the host.
toString
public String toString()
- Overrides:
toString in class Throwable