peer2me.network.bluetooth
Class Peer2MeHeaderSet

java.lang.Object
  extended by peer2me.network.bluetooth.Peer2MeHeaderSet
All Implemented Interfaces:
javax.obex.HeaderSet

public class Peer2MeHeaderSet
extends java.lang.Object
implements javax.obex.HeaderSet

This class contains user defined headers. The headers are used to create headersets that are specialized for the Peer2Me framework. The headers are used in OBEX connections and data transfers.

Author:
Kim Saxlund

Field Summary
static int END_OF_FILE
          If the datastream that is sent directly after the headers is the contents of a file, this header can be used to tell if this chunks contains the last data in the file.
static int FILE_NAME
          The name of the file.
static int FILE_SIZE
          The total size of the file.
static int LENGTH
          The length of the datastream that is sent directly after the headers are sent.
static int MESSAGE_ID
          The ID of the message.
static int MESSAGE_NUMBER
          If a message is sent in several chunks, each chunk must know which number it is.
static int MESSAGE_PART_ID
          The ID of a messagepart.
static int RECIPIENTS
          Can be used to send information about all the recipients in a message.
static int SENDER_ADDRESS
          The network address of the sender of the message should be associated with this header
static int SENDER_NAME
          The name of the sender of the message should be associated with this header
static int TOTAL_NUMBER_OF_MESSAGES
          The total number of chunks that this message consists of.
 
Fields inherited from interface javax.obex.HeaderSet
APPLICATION_PARAMETER, COUNT, DESCRIPTION, HTTP, NAME, OBJECT_CLASS, TARGET, TIME_4_BYTE, TIME_ISO_8601, TYPE, WHO
 
Constructor Summary
Peer2MeHeaderSet()
           
 
Method Summary
 void createAuthenticationChallenge(java.lang.String realm, boolean userID, boolean access)
          Required method from interface.
 java.lang.Object getHeader(int arg0)
          Required method from interface.
 int[] getHeaderList()
          Required method from interface.
 int getResponseCode()
          Required method from interface.
 void setHeader(int arg0, java.lang.Object arg1)
          Required method from interface.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SENDER_ADDRESS

public static final int SENDER_ADDRESS
The network address of the sender of the message should be associated with this header

See Also:
Constant Field Values

SENDER_NAME

public static final int SENDER_NAME
The name of the sender of the message should be associated with this header

See Also:
Constant Field Values

LENGTH

public static final int LENGTH
The length of the datastream that is sent directly after the headers are sent.

See Also:
Constant Field Values

MESSAGE_ID

public static final int MESSAGE_ID
The ID of the message. If a message is sent in several chunks, this ID must be used to identify which message the chunk belongs to.

See Also:
Constant Field Values

MESSAGE_NUMBER

public static final int MESSAGE_NUMBER
If a message is sent in several chunks, each chunk must know which number it is.

See Also:
Constant Field Values

TOTAL_NUMBER_OF_MESSAGES

public static final int TOTAL_NUMBER_OF_MESSAGES
The total number of chunks that this message consists of.

See Also:
Constant Field Values

END_OF_FILE

public static final int END_OF_FILE
If the datastream that is sent directly after the headers is the contents of a file, this header can be used to tell if this chunks contains the last data in the file.

See Also:
Constant Field Values

MESSAGE_PART_ID

public static final int MESSAGE_PART_ID
The ID of a messagepart. Files are usually be sent in several chunks. Since files are associated with a messagepart, this header is necessary to identify which messagepart the file belongs to.

See Also:
Constant Field Values

FILE_NAME

public static final int FILE_NAME
The name of the file.

See Also:
Constant Field Values

FILE_SIZE

public static final int FILE_SIZE
The total size of the file.

See Also:
Constant Field Values

RECIPIENTS

public static final int RECIPIENTS
Can be used to send information about all the recipients in a message. Is currently not in use.

See Also:
Constant Field Values
Constructor Detail

Peer2MeHeaderSet

public Peer2MeHeaderSet()
Method Detail

createAuthenticationChallenge

public void createAuthenticationChallenge(java.lang.String realm,
                                          boolean userID,
                                          boolean access)
Required method from interface. Not implemented.

Specified by:
createAuthenticationChallenge in interface javax.obex.HeaderSet

getHeader

public java.lang.Object getHeader(int arg0)
                           throws java.io.IOException
Required method from interface. Not implemented.

Specified by:
getHeader in interface javax.obex.HeaderSet
Throws:
java.io.IOException

getHeaderList

public int[] getHeaderList()
                    throws java.io.IOException
Required method from interface. Not implemented.

Specified by:
getHeaderList in interface javax.obex.HeaderSet
Throws:
java.io.IOException

getResponseCode

public int getResponseCode()
                    throws java.io.IOException
Required method from interface. Not implemented.

Specified by:
getResponseCode in interface javax.obex.HeaderSet
Throws:
java.io.IOException

setHeader

public void setHeader(int arg0,
                      java.lang.Object arg1)
Required method from interface. Not implemented.

Specified by:
setHeader in interface javax.obex.HeaderSet