Package com.sun.identity.liberty.ws.paos
Class PAOSHeader
- java.lang.Object
-
- com.sun.identity.liberty.ws.paos.PAOSHeader
-
public class PAOSHeader extends Object
ThePAOSHeaderclass is used by a web application on HTTP server side to parse aPAOSheader in an HTTP request from the user agent side. This header is used by the User Agent as aPAOSserver to publish which services are available, whichPAOSversions are supported, etc.. An examplePAOSheader looks like the following:PAOS: ver="ver1","ver2",ext="ext1","ext2";"service1","opt11", "opt12";"service2","opt21","opt22"This class has methods for obtaining all the parts inside such a header.
-
-
Constructor Summary
Constructors Constructor Description PAOSHeader(jakarta.servlet.http.HttpServletRequest req)This constructor accepts anHttpServletRequestand tries to parse thePAOSheader string if there is one inside.PAOSHeader(String paosHeaderString)This constructor accepts aPAOSheader string and tries to parse it.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IteratorgetExtensions()Returns the list of extensions asStrings.HashMapgetServicesAndOptions()Returns aHashMapcontaining the services and corresponding options.IteratorgetVersions()Returns the list of versions asStrings.
-
-
-
Constructor Detail
-
PAOSHeader
public PAOSHeader(jakarta.servlet.http.HttpServletRequest req) throws PAOSExceptionThis constructor accepts anHttpServletRequestand tries to parse thePAOSheader string if there is one inside.- Parameters:
req- the incoming HTTP request which is supposed to contain thePAOSheader.- Throws:
PAOSException- if there are any parsing errors because thePAOSheader is not there at all or because its content is not compliant to thePAOSspecifications.
-
PAOSHeader
public PAOSHeader(String paosHeaderString) throws PAOSException
This constructor accepts aPAOSheader string and tries to parse it.- Parameters:
paosHeaderString- thePAOSheader string which supposedly contains information on available services, etc..- Throws:
PAOSException- if there are any parsing error because thePAOSheader is invalid.
-
-
Method Detail
-
getVersions
public Iterator getVersions()
Returns the list of versions asStrings.- Returns:
- the list of versions as
Strings.
-
getExtensions
public Iterator getExtensions()
Returns the list of extensions asStrings.- Returns:
- the list of extensions as
Strings.
-
getServicesAndOptions
public HashMap getServicesAndOptions()
Returns aHashMapcontaining the services and corresponding options.- Returns:
- a
HashMapwith each key being a service represented as aString, and with each value being aSetof the corresponding options represented asStrings
-
-