org.apache.mina.protocol
Class ProtocolViolationException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by org.apache.mina.protocol.ProtocolViolationException
All Implemented Interfaces:
Serializable

public class ProtocolViolationException
extends Exception

An exception that is thrown when ProtocolEncoder cannot understand or failed to validate the specified message, or when ProtocolDecoder cannot understand or failed to validate the specified ByteBuffer content.

Version:
$Rev: 210062 $, $Date: 2005-07-11 12:52:38 +0900 $
Author:
Trustin Lee (trustin@apache.org)
See Also:
Serialized Form

Constructor Summary
ProtocolViolationException()
          Constructs a new instance.
ProtocolViolationException(String message)
          Constructs a new instance with the specified message.
ProtocolViolationException(String message, Throwable cause)
          Constructs a new instance with the specified message and the specified cause.
ProtocolViolationException(Throwable cause)
          Constructs a new instance with the specified cause.
 
Method Summary
 ByteBuffer getBuffer()
          Returns unknown message part.
 String getMessage()
          Returns the message and the hexdump of the unknown part.
 void setBuffer(ByteBuffer buffer)
          Sets unknown message part.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ProtocolViolationException

public ProtocolViolationException()
Constructs a new instance.


ProtocolViolationException

public ProtocolViolationException(String message)
Constructs a new instance with the specified message.


ProtocolViolationException

public ProtocolViolationException(Throwable cause)
Constructs a new instance with the specified cause.


ProtocolViolationException

public ProtocolViolationException(String message,
                                  Throwable cause)
Constructs a new instance with the specified message and the specified cause.

Method Detail

getMessage

public String getMessage()
Returns the message and the hexdump of the unknown part.

Overrides:
getMessage in class Throwable

getBuffer

public ByteBuffer getBuffer()
Returns unknown message part.


setBuffer

public void setBuffer(ByteBuffer buffer)
Sets unknown message part.



Copyright © 2004-2005 . All Rights Reserved.