Upload
lydia-nelson
View
231
Download
8
Embed Size (px)
Citation preview
卓越計劃進度報告JNDI
Java Naming and Directory Interface
網際網路實驗室報告人 894346 潘燕弘
Outline Naming and Directory Concepts What is JNDI JNDI Overview Preparations
Naming and Directory Concepts
The primary function of a naming system is to map names to objects It maps people-friendly names to addresses identifiers or objects typically used by computer programs For example the Internet Domain Name System (DNS) maps machine names (such as wwwsuncom) to IP addresses (like 1929485) A file system maps a file name (cbinautoexecbat for example) to a file handle that a program can use to access the contents of the file
Naming and Directory Concepts(cont)
Directory A directory object is a particular type of object that is used to represent the variety of information in a computing environment A printer directory object for example might be used to represent a printer
Attributes A directory object can have attributes associated with it For example a printer directory object might have as attributes its speed resolution and color A user directory object might have as attributes the users email address various telephone numbers postal mail address and computer account information An attribute has an attribute identifier and a set of attribute values The email address for example might have an attribute identifier of mail and value of johnsmithsomewherecom
What is JNDI The JavaTM Naming and Directory InterfaceTM
(JNDI) is an API specified in the Java programming language It provides naming and directory functionality to applications written in the Java programming language The JNDI is defined to be independent of any specific directory service implementation Thus a variety of directories--new emerging and already deployed ones--can be accessed in a common way
JNDI Overview
The JNDI architecture consists of an API (Application Programming Interface) and an SPI (Service Provider Interface) Java applications use the JNDI API to access a variety of naming and directory services The JNDI SPI enables a variety of naming and directory services to be plugged in transparently allowing the Java application using the JNDI API to access their services
JNDI Overview(cont)
JNDI Overview(cont)
The JNDI is divided into three packagesndash javaxnaming
ndash javaxnamingdirectory
ndash javaxnamingspi
Preparations
Required Software ndash Heres a checklist of softwaresystems that you need
Java Platform Software
JNDI Software
Service Provider Software
Naming and Directory Server Software
JNDI Overview(cont)
Contextndash Lookup()
Printer printer = (Printer)ctxlookup(treekiller) printerprint(report)
Names Bindings The Initial Context Exceptions back
JNDI Overview(cont) The Directory Context
ndash getAttributes()
ndash modifyAttributes()
ndash Searchesback
Outline Naming and Directory Concepts What is JNDI JNDI Overview Preparations
Naming and Directory Concepts
The primary function of a naming system is to map names to objects It maps people-friendly names to addresses identifiers or objects typically used by computer programs For example the Internet Domain Name System (DNS) maps machine names (such as wwwsuncom) to IP addresses (like 1929485) A file system maps a file name (cbinautoexecbat for example) to a file handle that a program can use to access the contents of the file
Naming and Directory Concepts(cont)
Directory A directory object is a particular type of object that is used to represent the variety of information in a computing environment A printer directory object for example might be used to represent a printer
Attributes A directory object can have attributes associated with it For example a printer directory object might have as attributes its speed resolution and color A user directory object might have as attributes the users email address various telephone numbers postal mail address and computer account information An attribute has an attribute identifier and a set of attribute values The email address for example might have an attribute identifier of mail and value of johnsmithsomewherecom
What is JNDI The JavaTM Naming and Directory InterfaceTM
(JNDI) is an API specified in the Java programming language It provides naming and directory functionality to applications written in the Java programming language The JNDI is defined to be independent of any specific directory service implementation Thus a variety of directories--new emerging and already deployed ones--can be accessed in a common way
JNDI Overview
The JNDI architecture consists of an API (Application Programming Interface) and an SPI (Service Provider Interface) Java applications use the JNDI API to access a variety of naming and directory services The JNDI SPI enables a variety of naming and directory services to be plugged in transparently allowing the Java application using the JNDI API to access their services
JNDI Overview(cont)
JNDI Overview(cont)
The JNDI is divided into three packagesndash javaxnaming
ndash javaxnamingdirectory
ndash javaxnamingspi
Preparations
Required Software ndash Heres a checklist of softwaresystems that you need
Java Platform Software
JNDI Software
Service Provider Software
Naming and Directory Server Software
JNDI Overview(cont)
Contextndash Lookup()
Printer printer = (Printer)ctxlookup(treekiller) printerprint(report)
Names Bindings The Initial Context Exceptions back
JNDI Overview(cont) The Directory Context
ndash getAttributes()
ndash modifyAttributes()
ndash Searchesback
Naming and Directory Concepts
The primary function of a naming system is to map names to objects It maps people-friendly names to addresses identifiers or objects typically used by computer programs For example the Internet Domain Name System (DNS) maps machine names (such as wwwsuncom) to IP addresses (like 1929485) A file system maps a file name (cbinautoexecbat for example) to a file handle that a program can use to access the contents of the file
Naming and Directory Concepts(cont)
Directory A directory object is a particular type of object that is used to represent the variety of information in a computing environment A printer directory object for example might be used to represent a printer
Attributes A directory object can have attributes associated with it For example a printer directory object might have as attributes its speed resolution and color A user directory object might have as attributes the users email address various telephone numbers postal mail address and computer account information An attribute has an attribute identifier and a set of attribute values The email address for example might have an attribute identifier of mail and value of johnsmithsomewherecom
What is JNDI The JavaTM Naming and Directory InterfaceTM
(JNDI) is an API specified in the Java programming language It provides naming and directory functionality to applications written in the Java programming language The JNDI is defined to be independent of any specific directory service implementation Thus a variety of directories--new emerging and already deployed ones--can be accessed in a common way
JNDI Overview
The JNDI architecture consists of an API (Application Programming Interface) and an SPI (Service Provider Interface) Java applications use the JNDI API to access a variety of naming and directory services The JNDI SPI enables a variety of naming and directory services to be plugged in transparently allowing the Java application using the JNDI API to access their services
JNDI Overview(cont)
JNDI Overview(cont)
The JNDI is divided into three packagesndash javaxnaming
ndash javaxnamingdirectory
ndash javaxnamingspi
Preparations
Required Software ndash Heres a checklist of softwaresystems that you need
Java Platform Software
JNDI Software
Service Provider Software
Naming and Directory Server Software
JNDI Overview(cont)
Contextndash Lookup()
Printer printer = (Printer)ctxlookup(treekiller) printerprint(report)
Names Bindings The Initial Context Exceptions back
JNDI Overview(cont) The Directory Context
ndash getAttributes()
ndash modifyAttributes()
ndash Searchesback
Naming and Directory Concepts(cont)
Directory A directory object is a particular type of object that is used to represent the variety of information in a computing environment A printer directory object for example might be used to represent a printer
Attributes A directory object can have attributes associated with it For example a printer directory object might have as attributes its speed resolution and color A user directory object might have as attributes the users email address various telephone numbers postal mail address and computer account information An attribute has an attribute identifier and a set of attribute values The email address for example might have an attribute identifier of mail and value of johnsmithsomewherecom
What is JNDI The JavaTM Naming and Directory InterfaceTM
(JNDI) is an API specified in the Java programming language It provides naming and directory functionality to applications written in the Java programming language The JNDI is defined to be independent of any specific directory service implementation Thus a variety of directories--new emerging and already deployed ones--can be accessed in a common way
JNDI Overview
The JNDI architecture consists of an API (Application Programming Interface) and an SPI (Service Provider Interface) Java applications use the JNDI API to access a variety of naming and directory services The JNDI SPI enables a variety of naming and directory services to be plugged in transparently allowing the Java application using the JNDI API to access their services
JNDI Overview(cont)
JNDI Overview(cont)
The JNDI is divided into three packagesndash javaxnaming
ndash javaxnamingdirectory
ndash javaxnamingspi
Preparations
Required Software ndash Heres a checklist of softwaresystems that you need
Java Platform Software
JNDI Software
Service Provider Software
Naming and Directory Server Software
JNDI Overview(cont)
Contextndash Lookup()
Printer printer = (Printer)ctxlookup(treekiller) printerprint(report)
Names Bindings The Initial Context Exceptions back
JNDI Overview(cont) The Directory Context
ndash getAttributes()
ndash modifyAttributes()
ndash Searchesback
What is JNDI The JavaTM Naming and Directory InterfaceTM
(JNDI) is an API specified in the Java programming language It provides naming and directory functionality to applications written in the Java programming language The JNDI is defined to be independent of any specific directory service implementation Thus a variety of directories--new emerging and already deployed ones--can be accessed in a common way
JNDI Overview
The JNDI architecture consists of an API (Application Programming Interface) and an SPI (Service Provider Interface) Java applications use the JNDI API to access a variety of naming and directory services The JNDI SPI enables a variety of naming and directory services to be plugged in transparently allowing the Java application using the JNDI API to access their services
JNDI Overview(cont)
JNDI Overview(cont)
The JNDI is divided into three packagesndash javaxnaming
ndash javaxnamingdirectory
ndash javaxnamingspi
Preparations
Required Software ndash Heres a checklist of softwaresystems that you need
Java Platform Software
JNDI Software
Service Provider Software
Naming and Directory Server Software
JNDI Overview(cont)
Contextndash Lookup()
Printer printer = (Printer)ctxlookup(treekiller) printerprint(report)
Names Bindings The Initial Context Exceptions back
JNDI Overview(cont) The Directory Context
ndash getAttributes()
ndash modifyAttributes()
ndash Searchesback
JNDI Overview
The JNDI architecture consists of an API (Application Programming Interface) and an SPI (Service Provider Interface) Java applications use the JNDI API to access a variety of naming and directory services The JNDI SPI enables a variety of naming and directory services to be plugged in transparently allowing the Java application using the JNDI API to access their services
JNDI Overview(cont)
JNDI Overview(cont)
The JNDI is divided into three packagesndash javaxnaming
ndash javaxnamingdirectory
ndash javaxnamingspi
Preparations
Required Software ndash Heres a checklist of softwaresystems that you need
Java Platform Software
JNDI Software
Service Provider Software
Naming and Directory Server Software
JNDI Overview(cont)
Contextndash Lookup()
Printer printer = (Printer)ctxlookup(treekiller) printerprint(report)
Names Bindings The Initial Context Exceptions back
JNDI Overview(cont) The Directory Context
ndash getAttributes()
ndash modifyAttributes()
ndash Searchesback
JNDI Overview(cont)
JNDI Overview(cont)
The JNDI is divided into three packagesndash javaxnaming
ndash javaxnamingdirectory
ndash javaxnamingspi
Preparations
Required Software ndash Heres a checklist of softwaresystems that you need
Java Platform Software
JNDI Software
Service Provider Software
Naming and Directory Server Software
JNDI Overview(cont)
Contextndash Lookup()
Printer printer = (Printer)ctxlookup(treekiller) printerprint(report)
Names Bindings The Initial Context Exceptions back
JNDI Overview(cont) The Directory Context
ndash getAttributes()
ndash modifyAttributes()
ndash Searchesback
JNDI Overview(cont)
The JNDI is divided into three packagesndash javaxnaming
ndash javaxnamingdirectory
ndash javaxnamingspi
Preparations
Required Software ndash Heres a checklist of softwaresystems that you need
Java Platform Software
JNDI Software
Service Provider Software
Naming and Directory Server Software
JNDI Overview(cont)
Contextndash Lookup()
Printer printer = (Printer)ctxlookup(treekiller) printerprint(report)
Names Bindings The Initial Context Exceptions back
JNDI Overview(cont) The Directory Context
ndash getAttributes()
ndash modifyAttributes()
ndash Searchesback
Preparations
Required Software ndash Heres a checklist of softwaresystems that you need
Java Platform Software
JNDI Software
Service Provider Software
Naming and Directory Server Software
JNDI Overview(cont)
Contextndash Lookup()
Printer printer = (Printer)ctxlookup(treekiller) printerprint(report)
Names Bindings The Initial Context Exceptions back
JNDI Overview(cont) The Directory Context
ndash getAttributes()
ndash modifyAttributes()
ndash Searchesback
JNDI Overview(cont)
Contextndash Lookup()
Printer printer = (Printer)ctxlookup(treekiller) printerprint(report)
Names Bindings The Initial Context Exceptions back
JNDI Overview(cont) The Directory Context
ndash getAttributes()
ndash modifyAttributes()
ndash Searchesback
JNDI Overview(cont) The Directory Context
ndash getAttributes()
ndash modifyAttributes()
ndash Searchesback