public class RemoteDomainConnectionService extends Object implements MasterDomainControllerClient, org.jboss.msc.service.Service<MasterDomainControllerClient>
DomainController
to the master
DomainController
ModelControllerClient.Factory
Modifier and Type | Field and Description |
---|---|
static String |
DOMAIN_CONNECTION_ID |
SERVICE_NAME
Modifier and Type | Method and Description |
---|---|
void |
close() |
org.jboss.dmr.ModelNode |
execute(org.jboss.dmr.ModelNode operation)
Execute an operation synchronously.
|
org.jboss.dmr.ModelNode |
execute(org.jboss.dmr.ModelNode operation,
OperationMessageHandler messageHandler)
Execute an operation synchronously, optionally receiving progress reports.
|
org.jboss.dmr.ModelNode |
execute(Operation operation)
Execute an operation synchronously.
|
org.jboss.dmr.ModelNode |
execute(Operation operation,
OperationMessageHandler messageHandler)
Execute an operation synchronously, optionally receiving progress reports.
|
org.jboss.threads.AsyncFuture<org.jboss.dmr.ModelNode> |
executeAsync(org.jboss.dmr.ModelNode operation,
OperationMessageHandler messageHandler)
Execute an operation in another thread, optionally receiving progress reports.
|
org.jboss.threads.AsyncFuture<org.jboss.dmr.ModelNode> |
executeAsync(Operation operation,
OperationMessageHandler messageHandler)
Execute an operation in another thread, optionally receiving progress reports.
|
OperationResponse |
executeOperation(Operation operation,
OperationMessageHandler messageHandler)
Execute an operation synchronously, optionally receiving progress reports, with the response
to the operation making available any input streams that the server may associate with the response.
|
org.jboss.threads.AsyncFuture<OperationResponse> |
executeOperationAsync(Operation operation,
OperationMessageHandler messageHandler)
Execute an operation in another thread, optionally receiving progress reports, with the response
to the operation making available any input streams that the server may associate with the response.
|
void |
fetchAndSyncMissingConfiguration(OperationContext context,
Resource original)
Pulls down missing data from the domain controller and applies it to the local model as a result of a change to a/an added server-config
|
void |
fetchDomainWideConfiguration()
Connect to the remote domain controller and fetch the
domain wide configuration, but do not register as a member of the domain.
|
HostFileRepository |
getRemoteFileRepository()
Gets a
HostFileRepository capable of retrieving files from the
master domain controller. |
MasterDomainControllerClient |
getValue() |
void |
register()
Register with the remote domain controller
|
void |
start(org.jboss.msc.service.StartContext context) |
void |
stop(org.jboss.msc.service.StopContext context) |
void |
unregister()
Unregister with the remote domain controller.
|
public static final String DOMAIN_CONNECTION_ID
public void register() throws IOException
register
in interface MasterDomainControllerClient
IOException
- if there was a problem talking to the remote hostpublic void unregister()
unregister
in interface MasterDomainControllerClient
public void fetchDomainWideConfiguration()
MasterDomainControllerClient
fetchDomainWideConfiguration
in interface MasterDomainControllerClient
public HostFileRepository getRemoteFileRepository()
HostFileRepository
capable of retrieving files from the
master domain controller.getRemoteFileRepository
in interface MasterDomainControllerClient
public org.jboss.dmr.ModelNode execute(org.jboss.dmr.ModelNode operation) throws IOException
ModelControllerClient
execute
in interface ModelControllerClient
operation
- the operation to executeIOException
- if an I/O error occurs while executing the operationpublic org.jboss.dmr.ModelNode execute(Operation operation) throws IOException
ModelControllerClient
OperationAttachments.isAutoCloseStreams()
.execute
in interface ModelControllerClient
operation
- the operation to executeIOException
- if an I/O error occurs while executing the operationpublic org.jboss.dmr.ModelNode execute(org.jboss.dmr.ModelNode operation, OperationMessageHandler messageHandler) throws IOException
ModelControllerClient
execute
in interface ModelControllerClient
operation
- the operation to executemessageHandler
- the message handler to use for operation progress reporting, or null
for noneIOException
- if an I/O error occurs while executing the operationpublic org.jboss.dmr.ModelNode execute(Operation operation, OperationMessageHandler messageHandler) throws IOException
ModelControllerClient
Note that associated input-streams have to be closed by the caller, after the
operation completed OperationAttachments.isAutoCloseStreams()
.
execute
in interface ModelControllerClient
operation
- the operation to executemessageHandler
- the message handler to use for operation progress reporting, or null
for noneIOException
- if an I/O error occurs while executing the operationpublic org.jboss.threads.AsyncFuture<org.jboss.dmr.ModelNode> executeAsync(org.jboss.dmr.ModelNode operation, OperationMessageHandler messageHandler)
ModelControllerClient
executeAsync
in interface ModelControllerClient
operation
- the operation to executemessageHandler
- the message handler to use for operation progress reporting, or null
for nonepublic org.jboss.threads.AsyncFuture<org.jboss.dmr.ModelNode> executeAsync(Operation operation, OperationMessageHandler messageHandler)
ModelControllerClient
Note that associated input-streams have to be closed by the caller, after the
operation completed OperationAttachments.isAutoCloseStreams()
.
executeAsync
in interface ModelControllerClient
operation
- the operation to executemessageHandler
- the message handler to use for operation progress reporting, or null
for nonepublic OperationResponse executeOperation(Operation operation, OperationMessageHandler messageHandler) throws IOException
ModelControllerClient
Note that associated input-streams have to be closed by the caller, after the
operation completed OperationAttachments.isAutoCloseStreams()
.
executeOperation
in interface ModelControllerClient
operation
- the operation to executemessageHandler
- the message handler to use for operation progress reporting, or null
for noneIOException
- if an I/O error occurs while executing the operationpublic org.jboss.threads.AsyncFuture<OperationResponse> executeOperationAsync(Operation operation, OperationMessageHandler messageHandler)
ModelControllerClient
Note that associated input-streams have to be closed by the caller, after the
operation completed OperationAttachments.isAutoCloseStreams()
.
executeOperationAsync
in interface ModelControllerClient
operation
- the operation to executemessageHandler
- the message handler to use for operation progress reporting, or null
for nonepublic void fetchAndSyncMissingConfiguration(OperationContext context, Resource original) throws OperationFailedException
MasterDomainControllerClient
fetchAndSyncMissingConfiguration
in interface MasterDomainControllerClient
context
- the operation contextOperationFailedException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
public void start(org.jboss.msc.service.StartContext context) throws org.jboss.msc.service.StartException
start
in interface org.jboss.msc.service.Service<MasterDomainControllerClient>
org.jboss.msc.service.StartException
public void stop(org.jboss.msc.service.StopContext context)
stop
in interface org.jboss.msc.service.Service<MasterDomainControllerClient>
public MasterDomainControllerClient getValue() throws IllegalStateException, IllegalArgumentException
getValue
in interface org.jboss.msc.value.Value<MasterDomainControllerClient>
IllegalStateException
IllegalArgumentException
Copyright © 2023 JBoss by Red Hat. All rights reserved.