|
JML | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.jml.message.MsnMimeMessage
net.sf.jml.message.p2p.MsnP2PMessage
public abstract class MsnP2PMessage
Msn P2P message. have a binary header. See: http://zoronax.bot2k3.net/msn6/msnp9/msnslp_p2p.html and http://siebe.bot2k3.net/docs/?url=binheaders.html.
Field Summary | |
---|---|
protected static int |
BINARY_FOOTER_LEN
Binary footer length |
protected static int |
BINARY_HEADER_LEN
Length of the binary header for the P2P messages. |
protected static int |
FLAG_ACK
|
protected static int |
FLAG_BYE
|
protected static int |
FLAG_BYE_ACK
|
protected static int |
FLAG_DATA
|
protected static int |
FLAG_NONE
|
protected static String |
KEY_P2P_DEST
P2P message destination header name. |
Fields inherited from class net.sf.jml.message.MsnMimeMessage |
---|
headers |
Constructor Summary | |
---|---|
MsnP2PMessage()
Creates a new P2P message. |
Method Summary | |
---|---|
protected abstract byte[] |
bodyToMessage()
Retrieve the body part for this P2P message. |
int |
getAppId()
Retrieves the application identifier for this P2P message. |
int |
getCurrentLength()
Retrieves the current length of this message. |
int |
getField7()
Retrieves the Acknowledged identifier for this P2P message. |
int |
getField8()
Retrieves the Acknowledged unique ID for this message. |
long |
getField9()
Retrieves the Acknowledged data size for this P2P message. |
int |
getFlag()
Retrieves the flag value for this P2P message. |
int |
getIdentifier()
Retrieves the message identifier for this P2P message. |
long |
getOffset()
Retrieves the data offset in this P2P message. |
String |
getP2PDest()
Retrieve the P2P destination header value. |
int |
getSessionId()
Retrieves the session identifier for this P2P message. |
long |
getTotalLength()
Retrieves the total length of the data (MsnObject) to be transmited. |
protected void |
messageReceived(MsnSession session,
MsnContact contact)
The message have received, invoked by dispatch thread |
protected void |
parseMessage(byte[] message)
Parse content from IncomingMSG's chunk data. |
protected abstract void |
parseP2PBody(ByteBuffer buffer)
Parse the body part of this P2P message. |
void |
setAppId(int appId)
Sets the application identifier for this P2P message. |
void |
setCurrentLength(int currentLength)
Sets the current length for this message. |
void |
setField7(int field7)
Sets the Acknowledged identifier for this message. |
void |
setField8(int field8)
Sets the Acknowledged unique ID for this message. |
void |
setField9(long field9)
Sets the Acknowledged data size for this P2P message. |
void |
setFlag(int flag)
Sets the new flag value for this P2P message. |
void |
setIdentifier(int identifier)
Sets the new message identifier for this P2P message. |
void |
setOffset(long offset)
Sets the offset of the transmited data for this P2P message. |
void |
setP2PDest(String dest)
Sets the destination for this P2P message. |
void |
setSessionId(int sessionId)
Sets the session identifier for this P2P message. |
void |
setTotalLength(long totalLength)
Sets the total amount of data to be transmited. |
protected String |
toDebugBody()
Retrieves a String representation of the body for this message. |
String |
toDebugString()
Creates a debug representation for this P2P message. |
OutgoingMSG[] |
toOutgoingMsg(MsnProtocol protocol)
Generate OutgoingMSGs. |
Methods inherited from class net.sf.jml.message.MsnMimeMessage |
---|
getCharset, getContentType, getHeaders, getMimeVersion, parseBuffer, setContentType, setMimeVersion, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static final String KEY_P2P_DEST
protected static final int BINARY_HEADER_LEN
protected static final int FLAG_NONE
protected static final int FLAG_ACK
protected static final int FLAG_BYE_ACK
protected static final int FLAG_DATA
protected static final int FLAG_BYE
protected static final int BINARY_FOOTER_LEN
Constructor Detail |
---|
public MsnP2PMessage()
Method Detail |
---|
protected void parseMessage(byte[] message)
MsnMimeMessage
parseMessage
in class MsnMimeMessage
message
- IncomingMSG's chunk datapublic OutgoingMSG[] toOutgoingMsg(MsnProtocol protocol)
MsnMimeMessage
toOutgoingMsg
in class MsnMimeMessage
protocol
- used MsnProtocol
MsnMimeMessage.toOutgoingMsg(MsnProtocol)
protected void messageReceived(MsnSession session, MsnContact contact)
MsnMimeMessage
messageReceived
in class MsnMimeMessage
session
- the MsnSession which received the messagecontact
- the user who sent this messageprotected abstract void parseP2PBody(ByteBuffer buffer)
buffer
- Buffer with the body to be parsed.protected abstract byte[] bodyToMessage()
public String toDebugString()
protected String toDebugBody()
public String getP2PDest()
public void setP2PDest(String dest)
dest
- New destination for this P2P message.public int getSessionId()
public void setSessionId(int sessionId)
sessionId
- New session identifier.public int getIdentifier()
public void setIdentifier(int identifier)
identifier
- New message identifier.public long getOffset()
public void setOffset(long offset)
offset
- New offset for the message.public long getTotalLength()
public void setTotalLength(long totalLength)
totalLength
- New total amount of data to be transmited for the
MsnObject.public int getCurrentLength()
public void setCurrentLength(int currentLength)
currentLength
- New current length for this message.public int getFlag()
public void setFlag(int flag)
flag
- Type of message.public int getField7()
public void setField7(int field7)
field7
- The identifier.public int getField8()
public void setField8(int field8)
field8
- The identifier.public long getField9()
public void setField9(long field9)
field9
- The size.public int getAppId()
public void setAppId(int appId)
appId
- New application identifier.
|
JML | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |