Java Doc for ObexPacketStream.java in  » 6.0-JDK-Modules » j2me » com » sun » kvem » jsr082 » obex » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » 6.0 JDK Modules » j2me » com.sun.kvem.jsr082.obex 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


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.


Field Summary
final static  intHEADER_AUTH_CHALLENGE
    
final static  intHEADER_AUTH_RESPONSE
    
 intOBEX_MAXIMUM_PACKET_LENGTH
    
final static  intOPCODE_ABORT
    
final static  intOPCODE_CONNECT
    
final static  intOPCODE_CONTINUE
    
final static  intOPCODE_DISCONNECT
    
final static  intOPCODE_FINAL
    
final static  intOPCODE_GET
    
final static  intOPCODE_GET_FINAL
    
final static  intOPCODE_PUT
    
final static  intOPCODE_SETPATH
    
final static  byte[]PACKET_ABORT
    
final static  byte[]PACKET_BAD_REQUEST
    
final static  byte[]PACKET_CONTINUE
    
final static  byte[]PACKET_DISCONNECT
    
final static  byte[]PACKET_NOT_IMPLEMENTED
    
final static  byte[]PACKET_SUCCESS
    
 VectorauthChallenges
     Sent authentication challenges.
 booleanauthFailed
     Set when sending auth challenge, reset when received valid auth response in next packet.
 VectorauthResponses
     Generated authentication responses.
 Authenticatorauthenticator
    
 byte[]buffercache
    
 booleanchallengesToSend
     Outgoing packet contains authentication challenges, so it should be sent immediatly.
 booleancontainsTargetHeader
     True if sending packet contains target header.
 intdataOffset
    
 booleandataOpeneddataClosed
    
 StackemptyHeadersPool
    
 booleanheaderOverflow
     True if one of sending headers cannot feet in empty packet.
 booleanisClient
     True if this is ClientSession, false in ServerConnectionImpl.
 booleanisConnected
     Client is connected flag.
 booleanisEof
    
 intmaxSendLength
    
 booleanmoreHeaders
     True when buffer contains packet for sending and some headers can be added.
 QueuedHeadernewHeader
    
 intpacketLength
    
 intpacketOffset
    
 intpacketType
    
 VectorqueuedHeaders
     Queue of outgoing headers, not feet in packet.
static  TimeZoneutcTimeZone
    

Constructor Summary
 ObexPacketStream(ObexTransport transport)
     Connection id used in setConnectionID, getConnectioID.

Method Summary
 voidbrokenLink()
     Sets link broken flag.
public  voidclose()
    
final  intdecodeLength16(int off)
    
abstract public  longgetConnectionID()
    
 intgetPacketLength()
    
public  ConnectiongetTransport()
    
abstract  voidheaderTooLarge()
     This method is called to handle a situation than header is too large.
 booleanisClosed()
    
abstract  voidonAuthenticationFailure(byte[] username)
     Called when requested authentication failed.
 voidonMissingAuthResponse()
    
 voidpacketAddAuthResponses()
    
final  voidpacketAddConnectionID(long id, HeaderSetImpl headers)
    
 intpacketAddData(byte[] data, int offset, int length)
    
final  voidpacketAddHeaders(HeaderSetImpl headers)
     Adds the specified headers to the packet.
 voidpacketBegin(byte[] head)
    
 booleanpacketEOFBody()
    
 voidpacketEnd()
    
 voidpacketEndStripConnID()
     Finish packet and send it.
 voidpacketMarkFinal()
    
final  voidparseEnd()
    
final  intparsePacketData(HeaderSetImpl headers, byte[] output, int outputOffset, int outputLength)
     Parse packet headers, put BODY field content (data) in specified output array.
final  voidparsePacketDataBegin(HeaderSetImpl headers, int offset)
     Begin parsing packet headers in packet possibly containing BODY (data fields).
final  voidparsePacketHeaders(HeaderSetImpl headers, int offset)
     Parser all packet headers, BODY headers should not apear and silently ignored.
final  voidrecvPacket()
    
 voidrestorePacketLength(int len)
    
final  voidsendPacket(byte[] head, long connectionId, HeaderSetImpl headers, boolean allHeaders)
    
public  voidsetAuthenticator(Authenticator authenticator)
    
abstract public  voidsetConnectionID(long id)
    
 voidsetPacketType(int type)
    
 booleanshouldSendAuthResponse()
    
static  intvalidateStatus(int status)
    

Field Detail
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.



authenticator
Authenticator authenticator(Code)



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)



emptyHeadersPool
Stack emptyHeadersPool(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.



isEof
boolean isEof(Code)



maxSendLength
int maxSendLength(Code)



moreHeaders
boolean moreHeaders(Code)
True when buffer contains packet for sending and some headers can be added.



newHeader
QueuedHeader newHeader(Code)



packetLength
int packetLength(Code)



packetOffset
int packetOffset(Code)



packetType
int packetType(Code)



queuedHeaders
Vector queuedHeaders(Code)
Queue of outgoing headers, not feet in packet.



utcTimeZone
static TimeZone utcTimeZone(Code)




Constructor Detail
ObexPacketStream
ObexPacketStream(ObexTransport transport)(Code)
Connection id used in setConnectionID, getConnectioID.




Method Detail
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)



getTransport
public Connection getTransport() throws IOException(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.



onMissingAuthResponse
void onMissingAuthResponse() throws IOException(Code)



packetAddAuthResponses
void packetAddAuthResponses() throws IOException(Code)



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)



packetAddHeaders
final void packetAddHeaders(HeaderSetImpl headers) throws IOException(Code)
Adds the specified headers to the packet.



packetBegin
void packetBegin(byte[] head)(Code)



packetEOFBody
boolean packetEOFBody()(Code)



packetEnd
void packetEnd() throws IOException(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)



parseEnd
final void parseEnd() throws IOException(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.



recvPacket
final void recvPacket() throws IOException(Code)



restorePacketLength
void restorePacketLength(int len)(Code)



sendPacket
final void sendPacket(byte[] head, long connectionId, HeaderSetImpl headers, boolean allHeaders) throws IOException(Code)



setAuthenticator
public void setAuthenticator(Authenticator authenticator)(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)



Methods inherited from java.lang.Object
public boolean equals(Object obj)(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.