org.netbeans.lib.cvsclient.event
Class BinaryMessageEvent

java.lang.Object
  extended by java.util.EventObject
      extended by org.netbeans.lib.cvsclient.event.CVSEvent
          extended by org.netbeans.lib.cvsclient.event.BinaryMessageEvent
All Implemented Interfaces:
java.io.Serializable

public class BinaryMessageEvent
extends CVSEvent

An event sent from the server to indicate that a binary message should be displayed to the user.

One protocol reponse mey be splitted into several messages.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
BinaryMessageEvent(java.lang.Object source, byte[] message, int len)
          Construct a MessageEvent
 
Method Summary
protected  void fireEvent(CVSListener listener)
          Fire the event to the event listener.
 byte[] getMessage()
          Raw data buffer that holds binary data.
 int getMessageLength()
          Defines valid data length in raw data buffer.
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BinaryMessageEvent

public BinaryMessageEvent(java.lang.Object source,
                          byte[] message,
                          int len)
Construct a MessageEvent

Parameters:
source - the source of the event
message - the message text
Method Detail

getMessage

public byte[] getMessage()
Raw data buffer that holds binary data.

Returns:
raw data buffer, its getMessageLength() subset represents actual data

getMessageLength

public int getMessageLength()
Defines valid data length in raw data buffer.

Returns:
number of valid bytes in message raw data buffer.

fireEvent

protected void fireEvent(CVSListener listener)
Fire the event to the event listener. Subclasses should call the appropriate method on the listener to dispatch this event.

Specified by:
fireEvent in class CVSEvent
Parameters:
listener - the event listener

 

Built on October 26 2010.  |  Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.