public class ServerRemoteAdminCommand extends RemoteAdminCommand
This class identifies the origin as a server (as opposed to a true admin client) for server-to-server authentication.
authToken, COMMAND_MODEL_MATCH_HEADER, host, logger, name, operands, options, output, password, port, prohibitDirectoryUploads, scope, secure, user| Constructor and Description |
|---|
ServerRemoteAdminCommand(org.glassfish.hk2.api.ServiceLocator habitat,
String name,
String host,
int port,
boolean secure,
String user,
String password,
Logger logger) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addAdditionalHeaders(URLConnection urlConnection)
Adds the admin indicator header to the request so.
|
protected AuthenticationInfo |
authenticationInfo() |
protected HttpConnectorAddress |
getHttpConnectorAddress(String host,
int port,
boolean shouldUseSecure)
Provides an HttpConnectorAddress for use in connecting to the desired
admin listener.
|
executeCommand, fetchCommandModel, getAttributes, getCanonicalHost, getCommandModel, getCommandURI, getFromEnvironment, getReadTimeout, getUsage, headers, isCommandModelFromCache, processHeaders, reportAuthenticationException, retryUsingSecureConnection, setCommandModel, setConnectTimeout, setFileOutputDirectory, setInteractive, setOmitCache, setReadTimeout, setResponseFormatType, setUserOut, updateAuthenticationprotected HttpConnectorAddress getHttpConnectorAddress(String host, int port, boolean shouldUseSecure)
RemoteAdminCommandThis implementation works for true admin clients and will not work correctly for commands submitted to instances from inside the DAS. (That is done from the implementation in ServerRemoteAdminCommand which extends this class.)
This code constructs the HttpConnectorAddress in a way that uses either no SSLSocketFactory (if security is off) or uses an SSLSocketFactory linked to the asadmin truststore.
getHttpConnectorAddress in class RemoteAdminCommandhost - the host name to which the connection should be madeport - the admin port on that hostshouldUseSecure - whether SSL should be used to connect or notprotected AuthenticationInfo authenticationInfo()
authenticationInfo in class RemoteAdminCommandprotected void addAdditionalHeaders(URLConnection urlConnection)
addAdditionalHeaders in class RemoteAdminCommandurlConnection - Copyright © 2017–2020 Eclipse Foundation. All rights reserved.