Rice Pastry API

org.mpisws.p2p.transport.util
Class DefaultErrorHandler<Identifier>

java.lang.Object
  extended by org.mpisws.p2p.transport.util.DefaultErrorHandler<Identifier>
Type Parameters:
Identifier -
E -
All Implemented Interfaces:
ErrorHandler<Identifier>

public class DefaultErrorHandler<Identifier>
extends java.lang.Object
implements ErrorHandler<Identifier>

Just logs the problems.

Author:
Jeff Hoye

Field Summary
 int NUM_BYTES_TO_PRINT
           
 
Constructor Summary
DefaultErrorHandler(Logger logger)
           
 
Method Summary
 void receivedException(Identifier i, java.lang.Throwable error)
          We got an exception.
 void receivedUnexpectedData(Identifier id, byte[] bytes, int pos, java.util.Map<java.lang.String,java.lang.Integer> options)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NUM_BYTES_TO_PRINT

public int NUM_BYTES_TO_PRINT
Constructor Detail

DefaultErrorHandler

public DefaultErrorHandler(Logger logger)
Method Detail

receivedUnexpectedData

public void receivedUnexpectedData(Identifier id,
                                   byte[] bytes,
                                   int pos,
                                   java.util.Map<java.lang.String,java.lang.Integer> options)
Specified by:
receivedUnexpectedData in interface ErrorHandler<Identifier>
Parameters:
id - the sender of the message (as can best be determined)
bytes - the entire message/socket header
pos - the location in the bytes that is unexpected

receivedException

public void receivedException(Identifier i,
                              java.lang.Throwable error)
Description copied from interface: ErrorHandler
We got an exception.

Specified by:
receivedException in interface ErrorHandler<Identifier>
Parameters:
i - the identifier responsible (if any)
error - the exception

Rice Pastry API

Copyright © 2001-2005 - Rice Pastry.


Imprint-Dataprotection