Java Doc for TargetDescriptor.java in  » Web-Services » xins » org » xins » common » service » 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 » Web Services » xins » org.xins.common.service 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.xins.common.service.Descriptor
      org.xins.common.service.TargetDescriptor

TargetDescriptor
final public class TargetDescriptor extends Descriptor (Code)
Descriptor for a single target service. A target descriptor defines a URL that identifies the location of the service. Also, it may define 3 kinds of time-outs:
total time-out ( TargetDescriptor.getTotalTimeOut() )
the maximum duration of a call, including connection time, time used to send the request, time used to receive the response, etc.
connection time-out ( TargetDescriptor.getConnectionTimeOut() )
the maximum time for attempting to establish a connection.
socket time-out ( TargetDescriptor.getSocketTimeOut() )
the maximum time for attempting to receive data on a socket.

version:
   $Revision: 1.62 $ $Date: 2007/05/21 08:34:42 $
author:
   Ernst de Haan
since:
   XINS 1.0.0



Constructor Summary
public  TargetDescriptor(String url)
     Constructs a new TargetDescriptor for the specified URL.
public  TargetDescriptor(String url, int timeOut)
     Constructs a new TargetDescriptor for the specified URL, with the specifed total time-out.
public  TargetDescriptor(String url, int timeOut, int connectionTimeOut)
     Constructs a new TargetDescriptor for the specified URL, with the specifed total time-out and connection time-out.
public  TargetDescriptor(String url, int timeOut, int connectionTimeOut, int socketTimeOut)
     Constructs a new TargetDescriptor for the specified URL, with the specifed total time-out, connection time-out and socket time-out.

Method Summary
public  booleanequals(Object obj)
     Indicates whether some other object is "equal to" this one.
public  intgetCRC()
     Returns the CRC-32 checksum for the URL of this target descriptor.
public  intgetConnectionTimeOut()
     Returns the connection time-out for a call to the service.
public  StringgetProtocol()
     Returns the protocol in the URL for the service.
public  intgetSocketTimeOut()
     Returns the socket time-out for a call to the service.
public  TargetDescriptorgetTargetByCRC(int crc)
     Returns the TargetDescriptor that matches the specified CRC-32 checksum.
public  intgetTargetCount()
     Counts the total number of target descriptors in/under this descriptor.
public  intgetTotalTimeOut()
     Returns the total time-out for a call to the service.
public  StringgetURL()
     Returns the URL for the service.
public  inthashCode()
     Returns a hash code value for the object.
public  booleanisGroup()
     Checks if this descriptor denotes a group of descriptors.
public  java.util.IteratoriterateTargets()
     Iterates over all leaves, the target descriptors.
public  StringtoString()
     Textual description of this object.


Constructor Detail
TargetDescriptor
public TargetDescriptor(String url) throws IllegalArgumentException, MalformedURLException(Code)
Constructs a new TargetDescriptor for the specified URL.

Note: Both the connection time-out and the socket time-out will be set to the default time-out: 5 seconds.
Parameters:
  url - the URL of the service, cannot be null.
throws:
  IllegalArgumentException - if url == null.
throws:
  MalformedURLException - if the specified URL is malformed.




TargetDescriptor
public TargetDescriptor(String url, int timeOut) throws IllegalArgumentException, MalformedURLException(Code)
Constructs a new TargetDescriptor for the specified URL, with the specifed total time-out.

Note: Both the connection time-out and the socket time-out will be set to equal the total time-out.
Parameters:
  url - the URL of the service, cannot be null.
Parameters:
  timeOut - the total time-out for the service, in milliseconds; or anon-positive value for no total time-out.
throws:
  IllegalArgumentException - if url == null.
throws:
  MalformedURLException - if the specified URL is malformed.




TargetDescriptor
public TargetDescriptor(String url, int timeOut, int connectionTimeOut) throws IllegalArgumentException, MalformedURLException(Code)
Constructs a new TargetDescriptor for the specified URL, with the specifed total time-out and connection time-out.

Note: If the passed connection time-out is smaller than 1 ms, or greater than the total time-out, then it will be adjusted to equal the total time-out.

Note: The socket time-out will be set to equal the total time-out.
Parameters:
  url - the URL of the service, cannot be null.
Parameters:
  timeOut - the total time-out for the service, in milliseconds; or anon-positive value for no total time-out.
Parameters:
  connectionTimeOut - the connection time-out for the service, in milliseconds; or anon-positive value if the connection time-out should equal the totaltime-out.
throws:
  IllegalArgumentException - if url == null.
throws:
  MalformedURLException - if the specified URL is malformed.




TargetDescriptor
public TargetDescriptor(String url, int timeOut, int connectionTimeOut, int socketTimeOut) throws IllegalArgumentException, MalformedURLException(Code)
Constructs a new TargetDescriptor for the specified URL, with the specifed total time-out, connection time-out and socket time-out.

Note: If the passed connection time-out is smaller than 1 ms, or greater than the total time-out, then it will be adjusted to equal the total time-out.

Note: If the passed socket time-out is smaller than 1 ms or greater than the total time-out, then it will be adjusted to equal the total time-out.
Parameters:
  url - the URL of the service, cannot be null.
Parameters:
  timeOut - the total time-out for the service, in milliseconds; or anon-positive value for no total time-out.
Parameters:
  connectionTimeOut - the connection time-out for the service, in milliseconds; or anon-positive value if the connection time-out should equal the totaltime-out.
Parameters:
  socketTimeOut - the socket time-out for the service, in milliseconds; or anon-positive value for no socket time-out.
throws:
  IllegalArgumentException - if url == null.
throws:
  MalformedURLException - if the specified URL is malformed.





Method Detail
equals
public boolean equals(Object obj)(Code)
Indicates whether some other object is "equal to" this one. This method considers obj equals if and only if it matches the following conditions:
  • obj instanceof TargetDescriptor
  • URL is equal
  • total time-out is equal
  • connection time-out is equal
  • socket time-out is equal

Parameters:
  obj - the reference object with which to compare.true if this object is the same as the objargument; false otherwise.
See Also:   TargetDescriptor.hashCode()



getCRC
public int getCRC()(Code)
Returns the CRC-32 checksum for the URL of this target descriptor. the CRC-32 checksum.



getConnectionTimeOut
public int getConnectionTimeOut()(Code)
Returns the connection time-out for a call to the service. the connection time-out for the service; always greater than 0 andsmaller than or equal to the total time-out.



getProtocol
public String getProtocol()(Code)
Returns the protocol in the URL for the service. the protocol in the URL, not null.
since:
   XINS 1.2.0



getSocketTimeOut
public int getSocketTimeOut()(Code)
Returns the socket time-out for a call to the service. the socket time-out for the service; always greater than 0 andsmaller than or equal to the total time-out.



getTargetByCRC
public TargetDescriptor getTargetByCRC(int crc)(Code)
Returns the TargetDescriptor that matches the specified CRC-32 checksum.
Parameters:
  crc - the CRC-32 checksum.the TargetDescriptor that matches the specified checksum, ornull, if none could be found in this descriptor.



getTargetCount
public int getTargetCount()(Code)
Counts the total number of target descriptors in/under this descriptor. the total number of target descriptors, always 1.



getTotalTimeOut
public int getTotalTimeOut()(Code)
Returns the total time-out for a call to the service. The value 0 is returned if there is no total time-out. the total time-out for the service, as a positive number, inmilli-seconds, or 0 if there is no total time-out.



getURL
public String getURL()(Code)
Returns the URL for the service. the URL for the service, not null.



hashCode
public int hashCode()(Code)
Returns a hash code value for the object. a hash code value for this object.
See Also:   Object.hashCode
See Also:   TargetDescriptor.equals(Object)



isGroup
public boolean isGroup()(Code)
Checks if this descriptor denotes a group of descriptors. false, since this descriptor does not denote a group.



iterateTargets
public java.util.Iterator iterateTargets()(Code)
Iterates over all leaves, the target descriptors.

The returned java.util.Iterator will only return this target descriptor. iterator that returns this target descriptor, nevernull.




toString
public String toString()(Code)
Textual description of this object. The string includes the URL and all time-out values. For example:
TargetDescriptor(url="http://api.google.com/some_api/"; total-time-out is 5300 ms; connection time-out is 1000 ms; socket time-out is disabled)
this TargetDescriptor as a String, nevernull.



Methods inherited from org.xins.common.service.Descriptor
abstract public TargetDescriptor getTargetByCRC(int crc)(Code)(Java Doc)
abstract public int getTargetCount()(Code)(Java Doc)
abstract public boolean isGroup()(Code)(Java Doc)
abstract public Iterator iterateTargets()(Code)(Java Doc)

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.