LimeWire Consolidated API

com.limegroup.gnutella.rudp.messages
Class AbstractLimeRUDPMessage<T extends RUDPMessage>

java.lang.Object
  extended by com.limegroup.gnutella.messages.AbstractMessage
      extended by com.limegroup.gnutella.rudp.messages.AbstractLimeRUDPMessage<T>
All Implemented Interfaces:
Message, Comparable<Message>, RUDPMessage

public abstract class AbstractLimeRUDPMessage<T extends RUDPMessage>
extends AbstractMessage
implements RUDPMessage

An abstract class that extends from Message and takes a DHTMessage as a delegate argument


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.limewire.rudp.messages.RUDPMessage
RUDPMessage.OpCode
 
Nested classes/interfaces inherited from interface com.limegroup.gnutella.messages.Message
Message.MessageCounter, Message.Network
 
Field Summary
protected  T delegate
          The message this is wrapping.
 
Fields inherited from interface org.limewire.rudp.messages.RUDPMessage
F_RUDP_MESSAGE, PROTOCOL_VERSION_NUMBER
 
Fields inherited from interface com.limegroup.gnutella.messages.Message
F_PING, F_PING_REPLY, F_PUSH, F_QUERY, F_QUERY_REPLY, F_ROUTE_TABLE_UPDATE, F_UDP_CONNECTION, F_VENDOR_MESSAGE, F_VENDOR_MESSAGE_STABLE
 
Method Summary
 void extendSequenceNumber(long seqNo)
          Extend the sequence number of incoming messages with the full 8 bytes of state
 byte getConnectionID()
          Return the messages connectionID identifier.
 int getDataLength()
          Return the length of data stored in this message.
 RUDPMessage.OpCode getOpCode()
          Gets the OpCode for the message.
 long getSequenceNumber()
          Return the messages sequence number
 int getTotalLength()
          Returns the total length of this, in bytes
 String toString()
           
 void write(OutputStream out)
          Writes the message to the OutputStream.
 void write(OutputStream out, byte[] buf)
          Writes a message out, using the buffer as the temporary header.
protected  void writePayload(OutputStream out)
           
 void writeQuickly(OutputStream out)
          Writes a message quickly, without using temporary buffers or crap.
 
Methods inherited from class com.limegroup.gnutella.messages.AbstractMessage
compareTo, getCreationTime, getFunc, getGUID, getHandlerClass, getHops, getLength, getNetwork, getPriority, getTTL, hop, isMulticast, isTCP, isUDP, isUnknownNetwork, makeGuid, repOk, setGUID, setHops, setPriority, setTTL, updateLength
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.limewire.rudp.messages.RUDPMessage
getLength
 

Field Detail

delegate

protected final T extends RUDPMessage delegate
The message this is wrapping.

Method Detail

getOpCode

public RUDPMessage.OpCode getOpCode()
Description copied from interface: RUDPMessage
Gets the OpCode for the message.

Specified by:
getOpCode in interface RUDPMessage

getTotalLength

public int getTotalLength()
Description copied from class: AbstractMessage
Returns the total length of this, in bytes

Specified by:
getTotalLength in interface Message
Overrides:
getTotalLength in class AbstractMessage

write

public void write(OutputStream out)
           throws IOException
Description copied from interface: RUDPMessage
Writes the message to the OutputStream.

Specified by:
write in interface Message
Specified by:
write in interface RUDPMessage
Overrides:
write in class AbstractMessage
Throws:
IOException

write

public final void write(OutputStream out,
                        byte[] buf)
                 throws IOException
Description copied from class: AbstractMessage
Writes a message out, using the buffer as the temporary header.

Specified by:
write in interface Message
Overrides:
write in class AbstractMessage
Throws:
IOException

writeQuickly

public final void writeQuickly(OutputStream out)
                        throws IOException
Description copied from class: AbstractMessage
Writes a message quickly, without using temporary buffers or crap.

Specified by:
writeQuickly in interface Message
Overrides:
writeQuickly in class AbstractMessage
Throws:
IOException

writePayload

protected final void writePayload(OutputStream out)
                           throws IOException
Specified by:
writePayload in class AbstractMessage
Throws:
IOException

toString

public String toString()
Overrides:
toString in class AbstractMessage

extendSequenceNumber

public void extendSequenceNumber(long seqNo)
Description copied from interface: RUDPMessage
Extend the sequence number of incoming messages with the full 8 bytes of state

Specified by:
extendSequenceNumber in interface RUDPMessage

getConnectionID

public byte getConnectionID()
Description copied from interface: RUDPMessage
Return the messages connectionID identifier.

Specified by:
getConnectionID in interface RUDPMessage

getDataLength

public int getDataLength()
Description copied from interface: RUDPMessage
Return the length of data stored in this message.

Specified by:
getDataLength in interface RUDPMessage

getSequenceNumber

public long getSequenceNumber()
Description copied from interface: RUDPMessage
Return the messages sequence number

Specified by:
getSequenceNumber in interface RUDPMessage

LimeWire Consolidated API

Copyright © 2009. All Rights Reserved.