Java Doc for Reference.java in  » Apache-Harmony-Java-SE » javax-package » javax » naming » 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 » Apache Harmony Java SE » javax package » javax.naming 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   javax.naming.Reference

All known Subclasses:   javax.naming.LinkRef,
Reference
public class Reference implements Cloneable,Serializable(Code)
A Reference contains the class of the object which is referenced together with a list of all the addresses at which this object may be found. Additionally the Reference has the location of a factory which can create this object together with the classname used to create the object.

The Reference class relates to objects which are not bound in a naming service but which need to be accessed via javax.naming. Reference, RefAddr and their subclasses provide a way to access objects other than those in naming and directory systems.



Field Summary
protected  Vector<RefAddr>addrs
     A list of the addresses provided for this object.
protected  StringclassFactory
     The class in a factory which is used to create an object of the type which is referenced.
protected  StringclassFactoryLocation
     The location of class classFactory.
protected  StringclassName
     The class of the object which is referenced.

Constructor Summary
public  Reference(String className)
     Constructs a Reference instance with an empty list of addresses using the supplied class name.
Parameters:
  className - the class of the object which is referenced.
public  Reference(String className, RefAddr addr)
     Constructs a Reference instance with one entry of address.
Parameters:
  className - the class of the object which is referenced.
public  Reference(String className, String classFactory, String classFactoryLocation)
     Constructs a Reference instance with an empty list of addresses using the supplied class name, factory class and factory location.
Parameters:
  className - the class of the object which is referenced.
public  Reference(String className, RefAddr addr, String classFactory, String classFactoryLocation)
     Constructs a Reference instance with one entry of address using the supplied class name, factory class and factory location.
Parameters:
  className - the class of the object which is referenced.

Method Summary
public  voidadd(RefAddr addr)
     Appends an address to the list.
Parameters:
  addr - the address to append.
public  voidadd(int index, RefAddr addr)
     Inserts an address within the list at the specified index.
Parameters:
  addr - the address to insert into the list.
public  voidclear()
     Deletes all the addresses from the address list.
public  Objectclone()
     Returns a deep clone of this Reference instance.
public  booleanequals(Object o)
     Returns true if this Reference instance is equal to the supplied object o.
public  RefAddrget(String type)
     Gets an address where the address type matches the specified string.
public  RefAddrget(int index)
     Gets the address held at the specified index in the address list.
Parameters:
  index - the index of the required address.
public  Enumeration<RefAddr>getAll()
     Gets all the addresses.
public  StringgetClassName()
     Gets the class of the object which is referenced.
public  StringgetFactoryClassLocation()
     Gets the location of the factory class.
public  StringgetFactoryClassName()
     Gets the class in a factory which is used to create an object of the type which is referenced.
public  inthashCode()
     Returns the hashcode for this Reference instance.
public  Objectremove(int index)
     Removes an address from the address list.
Parameters:
  index - the index of the address to remove.
public  intsize()
     Gets the number of addresses in the address list.
public  StringtoString()
     Returns the string representation of the class name together with the list of addresses.

Field Detail
addrs
protected Vector<RefAddr> addrs(Code)
A list of the addresses provided for this object. The default is null.



classFactory
protected String classFactory(Code)
The class in a factory which is used to create an object of the type which is referenced. The default is null.



classFactoryLocation
protected String classFactoryLocation(Code)
The location of class classFactory. To find class files the URL of the classfile is given. If there is more than one URL for the class then a list of URLs appears in the string using a space as a separator. The default is null.



className
protected String className(Code)
The class of the object which is referenced.




Constructor Detail
Reference
public Reference(String className)(Code)
Constructs a Reference instance with an empty list of addresses using the supplied class name.
Parameters:
  className - the class of the object which is referenced. It cannot benull.



Reference
public Reference(String className, RefAddr addr)(Code)
Constructs a Reference instance with one entry of address.
Parameters:
  className - the class of the object which is referenced. It cannot benull.
Parameters:
  addr - the object's address. It cannot be null.



Reference
public Reference(String className, String classFactory, String classFactoryLocation)(Code)
Constructs a Reference instance with an empty list of addresses using the supplied class name, factory class and factory location.
Parameters:
  className - the class of the object which is referenced. It cannot benull.
Parameters:
  classFactory - the class in a factory which is used to create an object ofthe type which is referenced. It may be null.
Parameters:
  classFactoryLocation - the location of the class file. It may be null.



Reference
public Reference(String className, RefAddr addr, String classFactory, String classFactoryLocation)(Code)
Constructs a Reference instance with one entry of address using the supplied class name, factory class and factory location.
Parameters:
  className - the class of the object which is referenced. It cannot benull.
Parameters:
  addr - the object's address. It cannot be null.
Parameters:
  classFactory - the class in a factory which is used to create an object ofthe type which is referenced. It may be null.
Parameters:
  classFactoryLocation - the location of the class file. It may be null.




Method Detail
add
public void add(RefAddr addr)(Code)
Appends an address to the list.
Parameters:
  addr - the address to append. It cannot be null.



add
public void add(int index, RefAddr addr)(Code)
Inserts an address within the list at the specified index.
Parameters:
  addr - the address to insert into the list. It cannot be null.
Parameters:
  index - the index where to insert the address. It must be greater thanor equal to 0 and less than or equal to the number of entriesin the list(size()).
throws:
  ArrayIndexOutOfBoundsException - If the index is invalid.



clear
public void clear()(Code)
Deletes all the addresses from the address list.



clone
public Object clone()(Code)
Returns a deep clone of this Reference instance. a deep clone of this object



equals
public boolean equals(Object o)(Code)
Returns true if this Reference instance is equal to the supplied object o. They are considered equal if their class name and list of addresses are equivalent (including the order of the addresses in the list). The factory class and location are ignored for the purposes of this comparison.
Parameters:
  o - the object to compare with true if this object is equal to o, otherwisefalse



get
public RefAddr get(String type)(Code)
Gets an address where the address type matches the specified string. There may be more than one entry in the list with the same address type but this method returns the first one found in the list.
Parameters:
  type - the address type to look for the first address whose type matches the string



get
public RefAddr get(int index)(Code)
Gets the address held at the specified index in the address list.
Parameters:
  index - the index of the required address. It must be greater than orequal to 0 and less than the number of entries in the list. the address held at the specified index
throws:
  ArrayIndexOutOfBoundsException - If the index is invalid.



getAll
public Enumeration<RefAddr> getAll()(Code)
Gets all the addresses. an enumeration of all the addresses



getClassName
public String getClassName()(Code)
Gets the class of the object which is referenced. The result cannot be null. the class of the object which is referenced



getFactoryClassLocation
public String getFactoryClassLocation()(Code)
Gets the location of the factory class. The result may be null. the location of the factory class



getFactoryClassName
public String getFactoryClassName()(Code)
Gets the class in a factory which is used to create an object of the type which is referenced. The result may be null. the class in a factory which is used to create the referencedobject



hashCode
public int hashCode()(Code)
Returns the hashcode for this Reference instance. The result is calculated by summing the hashcode of the class name and the hash codes of each of the addresses in the address list. the hashcode of this Reference instance



remove
public Object remove(int index)(Code)
Removes an address from the address list.
Parameters:
  index - the index of the address to remove. It must be greater than orequal to 0 and less than size(). the removed address
throws:
  ArrayIndexOutOfBoundsException - If the index is invalid.



size
public int size()(Code)
Gets the number of addresses in the address list. the size of the list



toString
public String toString()(Code)
Returns the string representation of the class name together with the list of addresses. the string representation of this object



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.