public class ServerRemoteRestAdminCommand extends RemoteRestAdminCommand
This class identifies the origin as a server (as opposed to a true admin client) for server-to-server authentication.
org.glassfish.api.admin.AdminCommandEventBroker.AdminCommandListener<T>, org.glassfish.api.admin.AdminCommandEventBroker.BrokerListenerRegEvent, org.glassfish.api.admin.AdminCommandEventBroker.EventBrokerUtils| Constructor and Description |
|---|
ServerRemoteRestAdminCommand(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.
|
closeSse, executeCommand, fetchCommandModel, findPropertyInReport, getActionReport, getAttributes, getCanonicalHost, getCommandModel, getCommandURI, getFromEnvironment, getManPage, getReadTimeout, getUsage, headers, isCommandModelFromCache, preinit, processHeaders, refetchInvalidModel, reportAuthenticationException, retryUsingSecureConnection, setActionReport, setCommandModel, setConnectTimeout, setEnableCommandModelCache, setFileOutputDirectory, setInteractive, setReadTimeout, setResponseFormatType, setUserOut, updateAuthentication, useSsefireEvent, fireEvent, getUtils, listening, registerListener, unregisterListenerpublic ServerRemoteRestAdminCommand(org.glassfish.hk2.api.ServiceLocator habitat,
String name,
String host,
int port,
boolean secure,
String user,
String password,
Logger logger)
throws org.glassfish.api.admin.CommandException
org.glassfish.api.admin.CommandExceptionprotected HttpConnectorAddress getHttpConnectorAddress(String host, int port, boolean shouldUseSecure)
RemoteRestAdminCommandThis 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 RemoteRestAdminCommandhost - 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 RemoteRestAdminCommandprotected void addAdditionalHeaders(URLConnection urlConnection)
addAdditionalHeaders in class RemoteRestAdminCommandurlConnection - Copyright © 2017–2020 Eclipse Foundation. All rights reserved.