Java Doc for TransportService.java in  » 6.0-JDK-Modules-com.sun » jdi » com » sun » jdi » connect » spi » 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 com.sun » jdi » com.sun.jdi.connect.spi 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.sun.jdi.connect.spi.TransportService

TransportService
abstract public class TransportService (Code)
A transport service for connections between a debugger and a target VM.

A transport service is a concrete subclass of this class that has a zero-argument constructor and implements the abstract methods specified below. It is the underlying service used by a com.sun.jdi.connect.Transport for connections between a debugger and a target VM.

A transport service is used to establish a connection between a debugger and a target VM, and to transport Java Debug Wire Protocol (JDWP) packets over an underlying communication protocol. In essence a transport service implementation binds JDWP (as specified in the JDWP specification) to an underlying communication protocol. A transport service implementation provides a reliable JDWP packet transportation service. JDWP packets are sent to and from the target VM without duplication or data loss. A transport service implementation may be based on an underlying communication protocol that is reliable or unreliable. If the underlying communication protocol is reliable then the transport service implementation may be relatively simple and may only need to transport JDWP packets as payloads of the underlying communication protocol. In the case of an unreliable communication protocol the transport service implementation may include additional protocol support in order to ensure that packets are not duplicated and that there is no data loss. The details of such protocols are specific to the implementation but may involve techniques such as the positive acknowledgment with retransmission technique used in protocols such as the Transmission Control Protocol (TCP) (see RFC 793 ).

A transport service can be used to initiate a connection to a target VM. This is done by invoking the TransportService.attach method. Alternatively, a transport service can listen and accept connections initiated by a target VM. This is done by invoking the TransportService.startListening(String) method to put the transport into listen mode. Then the TransportService.accept method is used to accept a connection initiated by a target VM.
since:
   1.5


Inner Class :abstract public static class Capabilities
Inner Class :abstract public static class ListenKey



Method Summary
abstract public  Connectionaccept(ListenKey listenKey, long acceptTimeout, long handshakeTimeout)
     Accept a connection from a target VM.

Waits (indefinitely or with timeout) to accept a connection from a target VM.

abstract public  Connectionattach(String address, long attachTimeout, long handshakeTimeout)
     Attaches to the specified address.

Attaches to the specified address and returns a connection representing the bi-directional communication channel to the target VM.

abstract public  Capabilitiescapabilities()
     Returns the capabilities of the transport service.
abstract public  Stringdescription()
     Returns a description of the transport service.
abstract public  Stringname()
     Returns a name to identify the transport service.
abstract public  ListenKeystartListening(String address)
     Listens on the specified address for inbound connections.

This method starts the transport service listening on the specified address so that it can subsequently accept an inbound connection.

abstract public  ListenKeystartListening()
     Listens on an address choosen by the transport service.

This convenience method works as if by invoking TransportService.startListening(String) startListening(null) .

abstract public  voidstopListening(ListenKey listenKey)
     Stop listening for inbound connections.

Invoking this method while another thread is blocked in TransportService.accept accept , with the same listen key, waiting to accept a connection will cause that thread to throw an IOException.




Method Detail
accept
abstract public Connection accept(ListenKey listenKey, long acceptTimeout, long handshakeTimeout) throws IOException(Code)
Accept a connection from a target VM.

Waits (indefinitely or with timeout) to accept a connection from a target VM. Returns a connection representing the bi-directional communication channel to the target VM.

Accepting a connection from a target VM involves two steps. First, the transport service waits to accept the connection from the target VM. Once the connection is established a handshake is performed to ensure that the connection is indeed to a target VM. The handshake involves the exchange of a string JDWP-Handshake as specified in the Java Debug Wire Protocol specification.
Parameters:
  listenKey - A listen key obtained from a previous call to TransportService.startListening(String) or TransportService.startListening().
Parameters:
  acceptTimeout - if this transport service supports an accept timeout, andif acceptTimeout is positive then block for up toacceptTimeout milliseconds, more or less, while waitingfor the target VM to connect.If the transport service does not support an accept timeoutor if acceptTimeout is zero then block indefinitelyfor a target VM to connect.
Parameters:
  handshakeTimeout - If this transport service supports a handshake timeout,and if handshakeTimeout is positive, then itspecifies the timeout, in milliseconds (more or less), touse when handshaking with the target VM. The exactusage of the timeout is specific to the transport service.A transport service may, for example, use the handshaketimeout as the inter-character timeout while waiting forthe JDWP-Handshake message from the target VM.Alternatively, a transport service may, for example,use the timeout as a timeout for the duration of thehandshake exchange.If the transport service does not support a handshaketimeout, of if handshakeTimeout is specifiedas zero then the handshake does not timeout if thereisn't a response from the target VM. The Connection representing the bi-directionalcommunication channel to the target VM.
throws:
  TransportTimeoutException - If a timeout occurs while waiting for a target VMto connect.
throws:
  IOException - If an I/O error occurs (including a timeout whenhandshaking).
throws:
  IllegalArgumentException - If the value of the acceptTimeout argument, orhandshakeTimeout is negative, or an invalid listen keyis provided.
throws:
  IllegalStateException - If TransportService.stopListening stopListening has already beencalled with this listen key and the transport serviceis no longer listening for inbound connections.
See Also:   TransportService.Capabilities.supportsAcceptTimeout




attach
abstract public Connection attach(String address, long attachTimeout, long handshakeTimeout) throws IOException(Code)
Attaches to the specified address.

Attaches to the specified address and returns a connection representing the bi-directional communication channel to the target VM.

Attaching to the target VM involves two steps: First, a connection is established to specified address. This is followed by a handshake to ensure that the connection is to a target VM. The handshake involves the exchange of a string JDWP-Handshake as specified in the Java Debug Wire Protocol specification.
Parameters:
  address - The address of the target VM.
Parameters:
  attachTimeout - If this transport service supports an attach timeout,and if attachTimeout is positive, then it specifiesthe timeout, in milliseconds (more or less), to usewhen attaching to the target VM. If the transport servicedoes not support an attach timeout, or if attachTimeoutis specified as zero then attach without any timeout.
Parameters:
  handshakeTimeout - If this transport service supports a handshake timeout,and if handshakeTimeout is positive, then itspecifies the timeout, in milliseconds (more or less), touse when handshaking with the target VM. The exactusage of the timeout are specific to the transport service.A transport service may, for example, use the handshaketimeout as the inter-character timeout while waiting forthe JDWP-Handshake message from the target VM.Alternatively, a transport service may, for example,use the handshakeTimeout as a timeout for the duration of thehandshake exchange. If the transport service does not support a handshaketimeout, or if handshakeTimeout is specified as zero then the handshake does not timeout if thereisn't a response from the target VM. The Connection representing the bi-directionalcommunication channel to the target VM.
throws:
  TransportTimeoutException - If a timeout occurs while establishing the connection.
throws:
  IOException - If an I/O error occurs (including a timeout whenhandshaking).
throws:
  IllegalArgumentException - If the address is invalid or the value of theattach timeout or handshake timeout is negative.
See Also:   TransportService.Capabilities.supportsAttachTimeout




capabilities
abstract public Capabilities capabilities()(Code)
Returns the capabilities of the transport service. the transport service capabilities



description
abstract public String description()(Code)
Returns a description of the transport service. The description of the transport service



name
abstract public String name()(Code)
Returns a name to identify the transport service. The name of the transport service



startListening
abstract public ListenKey startListening(String address) throws IOException(Code)
Listens on the specified address for inbound connections.

This method starts the transport service listening on the specified address so that it can subsequently accept an inbound connection. It does not wait until an inbound connection is established.
Parameters:
  address - The address to start listening for connections,or null to listen on an address choosenby the transport service. a listen key to be used in subsequent calls to be TransportService.accept accept or TransportService.stopListeningstopListening methods.
throws:
  IOException - If an I/O error occurs.
throws:
  IllegalArgumentException - If the specific address is invalid




startListening
abstract public ListenKey startListening() throws IOException(Code)
Listens on an address choosen by the transport service.

This convenience method works as if by invoking TransportService.startListening(String) startListening(null) .

a listen key to be used in subsequent calls to be TransportService.accept accept or TransportService.stopListeningstopListening methods.
throws:
  IOException - If an I/O error occurs.



stopListening
abstract public void stopListening(ListenKey listenKey) throws IOException(Code)
Stop listening for inbound connections.

Invoking this method while another thread is blocked in TransportService.accept accept , with the same listen key, waiting to accept a connection will cause that thread to throw an IOException. If the thread blocked in accept has already accepted a connection from a target VM and is in the process of handshaking with the target VM then invoking this method will not cause the thread to throw an exception.
Parameters:
  listenKey - The listen key obtained from a previous call to TransportService.startListening(String) or TransportService.startListening().
throws:
  IllegalArgumentException - If the listen key is invalid
throws:
  IOException - If an I/O error occurs.




Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(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.