| java.lang.Object com.sun.kvem.jsr082.obex.ObexPacketStream
All known Subclasses: com.sun.kvem.jsr082.obex.ServerConnectionImpl, com.sun.kvem.jsr082.obex.ClientSessionImpl,
ObexPacketStream | abstract public class ObexPacketStream implements Connection(Code) | | Obex core protocol.
|
Method Summary | |
void | brokenLink() Sets link broken flag. | public void | close() | final int | decodeLength16(int off) | abstract public long | getConnectionID() | int | getPacketLength() | public Connection | getTransport() | abstract void | headerTooLarge() This method is called to handle a situation than header is too large. | boolean | isClosed() | abstract void | onAuthenticationFailure(byte[] username) Called when requested authentication failed. | void | onMissingAuthResponse() | void | packetAddAuthResponses() | final void | packetAddConnectionID(long id, HeaderSetImpl headers) | int | packetAddData(byte[] data, int offset, int length) | final void | packetAddHeaders(HeaderSetImpl headers) Adds the specified headers to the packet. | void | packetBegin(byte[] head) | boolean | packetEOFBody() | void | packetEnd() | void | packetEndStripConnID() Finish packet and send it. | void | packetMarkFinal() | final void | parseEnd() | final int | parsePacketData(HeaderSetImpl headers, byte[] output, int outputOffset, int outputLength) Parse packet headers, put BODY field content (data) in specified output
array. | final void | parsePacketDataBegin(HeaderSetImpl headers, int offset) Begin parsing packet headers in packet possibly containing BODY
(data fields). | final void | parsePacketHeaders(HeaderSetImpl headers, int offset) Parser all packet headers, BODY headers should not apear
and silently ignored. | final void | recvPacket() | void | restorePacketLength(int len) | final void | sendPacket(byte[] head, long connectionId, HeaderSetImpl headers, boolean allHeaders) | public void | setAuthenticator(Authenticator authenticator) | abstract public void | setConnectionID(long id) | void | setPacketType(int type) | boolean | shouldSendAuthResponse() | static int | validateStatus(int status) |
HEADER_AUTH_CHALLENGE | final static int HEADER_AUTH_CHALLENGE(Code) | | |
HEADER_AUTH_RESPONSE | final static int HEADER_AUTH_RESPONSE(Code) | | |
OBEX_MAXIMUM_PACKET_LENGTH | int OBEX_MAXIMUM_PACKET_LENGTH(Code) | | |
OPCODE_ABORT | final static int OPCODE_ABORT(Code) | | |
OPCODE_CONNECT | final static int OPCODE_CONNECT(Code) | | |
OPCODE_CONTINUE | final static int OPCODE_CONTINUE(Code) | | |
OPCODE_DISCONNECT | final static int OPCODE_DISCONNECT(Code) | | |
OPCODE_FINAL | final static int OPCODE_FINAL(Code) | | |
OPCODE_GET | final static int OPCODE_GET(Code) | | |
OPCODE_GET_FINAL | final static int OPCODE_GET_FINAL(Code) | | |
OPCODE_PUT | final static int OPCODE_PUT(Code) | | |
OPCODE_SETPATH | final static int OPCODE_SETPATH(Code) | | |
PACKET_ABORT | final static byte[] PACKET_ABORT(Code) | | |
PACKET_BAD_REQUEST | final static byte[] PACKET_BAD_REQUEST(Code) | | |
PACKET_CONTINUE | final static byte[] PACKET_CONTINUE(Code) | | |
PACKET_DISCONNECT | final static byte[] PACKET_DISCONNECT(Code) | | |
PACKET_NOT_IMPLEMENTED | final static byte[] PACKET_NOT_IMPLEMENTED(Code) | | |
PACKET_SUCCESS | final static byte[] PACKET_SUCCESS(Code) | | |
authChallenges | Vector authChallenges(Code) | | Sent authentication challenges.
They will be used for check authentication responses.
|
authFailed | boolean authFailed(Code) | | Set when sending auth challenge,
reset when received valid auth response in next
packet.
|
authResponses | Vector authResponses(Code) | | Generated authentication responses. They will be send in sendPacket().
Stored in byte[] format.
|
buffercache | byte[] buffercache(Code) | | |
challengesToSend | boolean challengesToSend(Code) | | Outgoing packet contains authentication challenges, so it should be
sent immediatly.
|
containsTargetHeader | boolean containsTargetHeader(Code) | | True if sending packet contains target header.
|
dataOffset | int dataOffset(Code) | | |
dataOpeneddataClosed | boolean dataOpeneddataClosed(Code) | | |
headerOverflow | boolean headerOverflow(Code) | | True if one of sending headers cannot feet in empty packet.
|
isClient | boolean isClient(Code) | | True if this is ClientSession, false in ServerConnectionImpl.
|
isConnected | boolean isConnected(Code) | | Client is connected flag. Ignored by ServerConnectionImpl.
|
maxSendLength | int maxSendLength(Code) | | |
moreHeaders | boolean moreHeaders(Code) | | True when buffer contains packet for sending and some headers can
be added.
|
packetLength | int packetLength(Code) | | |
packetOffset | int packetOffset(Code) | | |
packetType | int packetType(Code) | | |
queuedHeaders | Vector queuedHeaders(Code) | | Queue of outgoing headers, not feet in packet.
|
ObexPacketStream | ObexPacketStream(ObexTransport transport)(Code) | | Connection id used in setConnectionID ,
getConnectioID .
|
brokenLink | void brokenLink()(Code) | | Sets link broken flag.
|
close | public void close()(Code) | | |
decodeLength16 | final int decodeLength16(int off)(Code) | | |
getConnectionID | abstract public long getConnectionID()(Code) | | |
getPacketLength | int getPacketLength()(Code) | | |
headerTooLarge | abstract void headerTooLarge() throws IOException(Code) | | This method is called to handle a situation than header is too large.
throws: IOException - |
isClosed | boolean isClosed()(Code) | | |
onAuthenticationFailure | abstract void onAuthenticationFailure(byte[] username) throws IOException(Code) | | Called when requested authentication failed.
Implemented on server to call handler.
|
packetAddConnectionID | final void packetAddConnectionID(long id, HeaderSetImpl headers)(Code) | | Connection Identifier:
must be first header in packet
0xFFFFFFFF considered invalid - it is up to application
can't be sent on connect() request
can't be used with Target header in one packet
|
packetAddData | int packetAddData(byte[] data, int offset, int length)(Code) | | |
packetBegin | void packetBegin(byte[] head)(Code) | | |
packetEOFBody | boolean packetEOFBody()(Code) | | |
packetEndStripConnID | void packetEndStripConnID() throws IOException(Code) | | Finish packet and send it. Remove Connection ID header if packet also
contains TARGET header.
|
packetMarkFinal | void packetMarkFinal()(Code) | | |
parsePacketData | final int parsePacketData(HeaderSetImpl headers, byte[] output, int outputOffset, int outputLength) throws IOException(Code) | | Parse packet headers, put BODY field content (data) in specified output
array. If output is null, search for a BODY block and return 1 if it is
found.
number of bytes put in output. |
parsePacketDataBegin | final void parsePacketDataBegin(HeaderSetImpl headers, int offset)(Code) | | Begin parsing packet headers in packet possibly containing BODY
(data fields).
|
parsePacketHeaders | final void parsePacketHeaders(HeaderSetImpl headers, int offset) throws IOException(Code) | | Parser all packet headers, BODY headers should not apear
and silently ignored.
|
restorePacketLength | void restorePacketLength(int len)(Code) | | |
setConnectionID | abstract public void setConnectionID(long id)(Code) | | |
setPacketType | void setPacketType(int type)(Code) | | |
shouldSendAuthResponse | boolean shouldSendAuthResponse()(Code) | | |
validateStatus | static int validateStatus(int status)(Code) | | |
|
|