com.vwp.util
Class MessagePipe

java.lang.Object
  extended by com.vwp.util.MessagePipe

public class MessagePipe
extends java.lang.Object

A base class for message transfers; this class should be overridden using own pipe...()-methods and could be used e.g. to transfer information from a separate thread to the main program


Constructor Summary
MessagePipe()
          The default constructor
 
Method Summary
 void pipeChatMessage(java.lang.String nick, java.lang.String msg)
          This method should be overridden by own ones to use it as transfer interface
 void pipeDownloadTick()
          This method should be overridden by own ones to use it for download progress information.
 void pipeErrorCode(int errcode)
          This method should be overridden by own ones to use it as transfer interface
 void pipeErrorMessage(java.lang.String errmsg)
          This method should be overridden by own ones to use it as transfer interface
 void pipeMessage(java.lang.String msg)
          This method should be overridden by own ones to use it as transfer interface
 void pipeMiscData(int type, java.lang.Object data)
          This method should be overridden by own ones to use it as transfer interface.
 void pipeRename(java.lang.String oldname, java.lang.String newname)
          This method should be overridden by own ones to use it as transfer interface
 void pipeTransmissionData(long msecs, long bytes)
          This method should be overridden by own ones to use it as transfer interface.
 void pipeWhisperedMessage(java.lang.String nick, java.lang.String msg)
          This method should be overridden by own ones to use it as transfer interface
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessagePipe

public MessagePipe()
The default constructor

Method Detail

pipeMessage

public void pipeMessage(java.lang.String msg)
This method should be overridden by own ones to use it as transfer interface

Parameters:
msg - the string which has to be transferred

pipeChatMessage

public void pipeChatMessage(java.lang.String nick,
                            java.lang.String msg)
This method should be overridden by own ones to use it as transfer interface

Parameters:
nick - the name of the user which has sent this chat text
msg - the string which has to be transferred

pipeWhisperedMessage

public void pipeWhisperedMessage(java.lang.String nick,
                                 java.lang.String msg)
This method should be overridden by own ones to use it as transfer interface

Parameters:
nick - the name of the user which has sent this whispered chat text
msg - the string which has to be transferred

pipeRename

public void pipeRename(java.lang.String oldname,
                       java.lang.String newname)
This method should be overridden by own ones to use it as transfer interface

Parameters:
oldname - the old name which has to be renamed
newname - the name to what it has to be renamed

pipeErrorMessage

public void pipeErrorMessage(java.lang.String errmsg)
This method should be overridden by own ones to use it as transfer interface

Parameters:
errmsg - the errorstring which has to be transferred

pipeErrorCode

public void pipeErrorCode(int errcode)
This method should be overridden by own ones to use it as transfer interface

Parameters:
errcode - the error code which has to be transferred

pipeTransmissionData

public void pipeTransmissionData(long msecs,
                                 long bytes)
This method should be overridden by own ones to use it as transfer interface. It can be used to transfer information about a data transmission

Parameters:
msecs - the time the transmission lasted
bytes - the number of bytes which have been transferred during this time

pipeMiscData

public void pipeMiscData(int type,
                         java.lang.Object data)
This method should be overridden by own ones to use it as transfer interface. It can be used to transfer every kind of data.

Parameters:
type - specifies what kind of data is transfered and describes the exact type of the "data" parameter
data - the transfered object itself

pipeDownloadTick

public void pipeDownloadTick()
This method should be overridden by own ones to use it for download progress information. This method is called during a download process from time to time.