public class Banner extends Object
Example output:
Use HTTP POST to submit your JSON-RPC 2.0 request Web service: LdapAuth, version 3.0.1 (2014-02-20) Vendor: Connect2id Ltd., http://connect2id.com Supported JSON-RPC 2.0 requests: * user.auth * user.get * ws.getName * ws.getTime * ws.getVersion
Constructor and Description |
---|
Banner(String wsName,
String wsVersion,
String[] methods)
Creates a new welcome banner for a Connect2id JSON-RPC 2.0 service.
|
Modifier and Type | Method and Description |
---|---|
void |
apply(javax.servlet.http.HttpServletResponse httpResponse)
Applies this banner to the specified HTTP servlet response.
|
static String |
composeMessage(String wsName,
String wsVersion,
String[] methods)
Composes a banner message.
|
String[] |
getHandledJSONRPC2Methods()
Gets the handled JSON-RPC 2.0 methods.
|
String |
getWsName()
Gets the web service name.
|
String |
getWsVersion()
Gets the web service version and build date.
|
public Banner(String wsName, String wsVersion, String[] methods)
wsName
- The web service name. Must not be null
.wsVersion
- The web service version and build date. Must not be
null
.methods
- The handled methods. Must not be null
.public String getWsVersion()
public String[] getHandledJSONRPC2Methods()
public static String composeMessage(String wsName, String wsVersion, String[] methods)
wsName
- The web service name. Must not be null
.wsVersion
- The web service version and build date. Must not be
null
.methods
- The handled methods. Must not be null
.public void apply(javax.servlet.http.HttpServletResponse httpResponse) throws IOException
Appends a "X-Web-Service" HTTP header set to getWsName()
.
Sets the "Content-Type" HTTP header to "text/plain;charset=utf-8".
Prints a message with the following format:
Use HTTP POST to submit your JSON-RPC 2.0 request Web service: [ws-name], [ws-version] Vendor: Connect2id Ltd., http://connect2id.com Supported JSON-RPC 2.0 requests: * [method-1] * [method-2] * [method-x]
httpResponse
- The HTTP servlet response.IOException
- If an I/O exception was encountered.Copyright © 2020 Connect2id. All rights reserved.