Package com.sun.identity.liberty.ws.paos
Class PAOSHeader
- java.lang.Object
-
- com.sun.identity.liberty.ws.paos.PAOSHeader
-
@SupportedAll public class PAOSHeader extends Object
ThePAOSHeader
class is used by a web application on HTTP server side to parse aPAOS
header in an HTTP request from the user agent side. This header is used by the User Agent as aPAOS
server to publish which services are available, whichPAOS
versions are supported, etc.. An examplePAOS
header 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(String paosHeaderString)
This constructor accepts aPAOS
header string and tries to parse it.PAOSHeader(javax.servlet.http.HttpServletRequest req)
This constructor accepts anHttpServletRequest
and tries to parse thePAOS
header string if there is one inside.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Iterator
getExtensions()
Returns the list of extensions asString
s.HashMap
getServicesAndOptions()
Returns aHashMap
containing the services and corresponding options.Iterator
getVersions()
Returns the list of versions asString
s.
-
-
-
Constructor Detail
-
PAOSHeader
public PAOSHeader(javax.servlet.http.HttpServletRequest req) throws PAOSException
This constructor accepts anHttpServletRequest
and tries to parse thePAOS
header string if there is one inside.- Parameters:
req
- the incoming HTTP request which is supposed to contain thePAOS
header.- Throws:
PAOSException
- if there are any parsing errors because thePAOS
header is not there at all or because its content is not compliant to thePAOS
specifications.
-
PAOSHeader
public PAOSHeader(String paosHeaderString) throws PAOSException
This constructor accepts aPAOS
header string and tries to parse it.- Parameters:
paosHeaderString
- thePAOS
header string which supposedly contains information on available services, etc..- Throws:
PAOSException
- if there are any parsing error because thePAOS
header is invalid.
-
-
Method Detail
-
getVersions
public Iterator getVersions()
Returns the list of versions asString
s.- Returns:
- the list of versions as
String
s.
-
getExtensions
public Iterator getExtensions()
Returns the list of extensions asString
s.- Returns:
- the list of extensions as
String
s.
-
getServicesAndOptions
public HashMap getServicesAndOptions()
Returns aHashMap
containing the services and corresponding options.- Returns:
- a
HashMap
with each key being a service represented as aString
, and with each value being aSet
of the corresponding options represented asString
s
-
-