idx
int64
0
165k
question
stringlengths
73
5.81k
target
stringlengths
5
918
145,800
private Set < String > checkModel ( final ModelNode model , TransformationContext context ) throws OperationFailedException { final Set < String > attributes = new HashSet < String > ( ) ; AttributeTransformationRequirementChecker checker ; for ( final String attribute : attributeNames ) { if ( model . hasDefined ( att...
Check the model for expression values .
145,801
public void setValue ( String propName , Object value ) { for ( RequestProp prop : props ) { if ( prop . getName ( ) . equals ( propName ) ) { JComponent valComp = prop . getValueComponent ( ) ; if ( valComp instanceof JTextComponent ) { ( ( JTextComponent ) valComp ) . setText ( value . toString ( ) ) ; } if ( valComp...
Set the value of the underlying component . Note that this will not work for ListEditor components . Also note that for a JComboBox The value object must have the same identity as an object in the drop - down .
145,802
static void doDifference ( Map < String , String > left , Map < String , String > right , Map < String , String > onlyOnLeft , Map < String , String > onlyOnRight , Map < String , String > updated ) { onlyOnRight . clear ( ) ; onlyOnRight . putAll ( right ) ; for ( Map . Entry < String , String > entry : left . entrySe...
calculate the difference of the two maps so we know what was added removed & updated
145,803
public void close ( ) throws IOException { final ManagedBinding binding = this . socketBindingManager . getNamedRegistry ( ) . getManagedBinding ( this . name ) ; if ( binding == null ) { return ; } binding . close ( ) ; }
Closes the outbound socket binding connection .
145,804
public static boolean requiresReload ( final Set < Flag > flags ) { return flags . contains ( Flag . RESTART_ALL_SERVICES ) || flags . contains ( Flag . RESTART_RESOURCE_SERVICES ) ; }
Checks to see within the flags if a reload i . e . not a full restart is required .
145,805
protected void updateState ( final String name , final InstallationModificationImpl modification , final InstallationModificationImpl . InstallationState state ) { final PatchableTarget . TargetInfo identityInfo = modification . getModifiedState ( ) ; this . identity = new Identity ( ) { public String getVersion ( ) { ...
Update the installed identity using the modified state from the modification .
145,806
public static Set < String > listAllLinks ( OperationContext context , String overlay ) { Set < String > serverGoupNames = listServerGroupsReferencingOverlay ( context . readResourceFromRoot ( PathAddress . EMPTY_ADDRESS ) , overlay ) ; Set < String > links = new HashSet < > ( ) ; for ( String serverGoupName : serverGo...
Returns all the deployment runtime names associated with an overlay accross all server groups .
145,807
public static Set < String > listLinks ( OperationContext context , PathAddress overlayAddress ) { Resource overlayResource = context . readResourceFromRoot ( overlayAddress ) ; if ( overlayResource . hasChildren ( DEPLOYMENT ) ) { return overlayResource . getChildrenNames ( DEPLOYMENT ) ; } return Collections . emptyS...
Returns all the deployment runtime names associated with an overlay .
145,808
public static void redeployDeployments ( OperationContext context , PathAddress deploymentsRootAddress , Set < String > deploymentNames ) throws OperationFailedException { for ( String deploymentName : deploymentNames ) { PathAddress address = deploymentsRootAddress . append ( DEPLOYMENT , deploymentName ) ; OperationS...
We are adding a redeploy operation step for each specified deployment runtime name .
145,809
public static void redeployLinksAndTransformOperation ( OperationContext context , ModelNode removeOperation , PathAddress deploymentsRootAddress , Set < String > runtimeNames ) throws OperationFailedException { Set < String > deploymentNames = listDeployments ( context . readResourceFromRoot ( deploymentsRootAddress )...
It will look for all the deployments under the deploymentsRootAddress with a runtimeName in the specified list of runtime names and then transform the operation so that every server having those deployments will redeploy the affected deployments .
145,810
public static Set < String > listDeployments ( Resource deploymentRootResource , Set < String > runtimeNames ) { Set < Pattern > set = new HashSet < > ( ) ; for ( String wildcardExpr : runtimeNames ) { Pattern pattern = DeploymentOverlayIndex . getPattern ( wildcardExpr ) ; set . add ( pattern ) ; } return listDeployme...
Returns the deployment names with the specified runtime names at the specified deploymentRootAddress .
145,811
public void execute ( CommandHandler handler , int timeout , TimeUnit unit ) throws CommandLineException , InterruptedException , ExecutionException , TimeoutException { ExecutableBuilder builder = new ExecutableBuilder ( ) { CommandContext c = newTimeoutCommandContext ( ctx ) ; public Executable build ( ) { return ( )...
public for testing purpose
145,812
void execute ( ExecutableBuilder builder , int timeout , TimeUnit unit ) throws CommandLineException , InterruptedException , ExecutionException , TimeoutException { Future < Void > task = executorService . submit ( ( ) -> { builder . build ( ) . execute ( ) ; return null ; } ) ; try { if ( timeout <= 0 ) { task . get ...
The CommandContext can be retrieved thatnks to the ExecutableBuilder .
145,813
public String getOriginalValue ( ParsedCommandLine parsedLine , boolean required ) throws CommandFormatException { String value = null ; if ( parsedLine . hasProperties ( ) ) { if ( index >= 0 ) { List < String > others = parsedLine . getOtherProperties ( ) ; if ( others . size ( ) > index ) { return others . get ( ind...
Returns value as it appeared on the command line with escape sequences and system properties not resolved . The variables though are resolved during the initial parsing of the command line .
145,814
public static void logBeforeExit ( ExitLogger logger ) { try { if ( logged . compareAndSet ( false , true ) ) { logger . logExit ( ) ; } } catch ( Throwable ignored ) { } }
Invokes the exit logger if and only if no ExitLogger was previously invoked .
145,815
private String getName ( CommandContext ctx , boolean failInBatch ) throws CommandLineException { final ParsedCommandLine args = ctx . getParsedCommandLine ( ) ; final String name = this . name . getValue ( args , true ) ; if ( name == null ) { throw new CommandFormatException ( this . name + " is missing value." ) ; }...
Validate that the overlay exists . If it doesn t exist throws an exception if not in batch mode or if failInBatch is true . In batch mode we could be in the case that the overlay doesn t exist yet .
145,816
public static ServiceName moduleSpecServiceName ( ModuleIdentifier identifier ) { if ( ! isDynamicModule ( identifier ) ) { throw ServerLogger . ROOT_LOGGER . missingModulePrefix ( identifier , MODULE_PREFIX ) ; } return MODULE_SPEC_SERVICE_PREFIX . append ( identifier . getName ( ) ) . append ( identifier . getSlot ( ...
Returns the corresponding ModuleSpec service name for the given module .
145,817
public static ServiceName moduleResolvedServiceName ( ModuleIdentifier identifier ) { if ( ! isDynamicModule ( identifier ) ) { throw ServerLogger . ROOT_LOGGER . missingModulePrefix ( identifier , MODULE_PREFIX ) ; } return MODULE_RESOLVED_SERVICE_PREFIX . append ( identifier . getName ( ) ) . append ( identifier . ge...
Returns the corresponding module resolved service name for the given module .
145,818
public static ServiceName moduleServiceName ( ModuleIdentifier identifier ) { if ( ! identifier . getName ( ) . startsWith ( MODULE_PREFIX ) ) { throw ServerLogger . ROOT_LOGGER . missingModulePrefix ( identifier , MODULE_PREFIX ) ; } return MODULE_SERVICE_PREFIX . append ( identifier . getName ( ) ) . append ( identif...
Returns the corresponding ModuleLoadService service name for the given module .
145,819
public void deploy ( DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext . getDeploymentUnit ( ) ; final ServicesAttachment servicesAttachment = deploymentUnit . getAttachment ( Attachments . SERVICES ) ; if ( servicesAttachment == null || ...
If the deployment has a module attached it will ask the module to load the ServiceActivator services .
145,820
synchronized void openConnection ( final ModelController controller , final ActiveOperation . CompletedCallback < ModelNode > callback ) throws Exception { boolean ok = false ; final Connection connection = connectionManager . connect ( ) ; try { channelHandler . executeRequest ( new ServerRegisterRequest ( ) , null , ...
Connect to the HC and retrieve the current model updates .
145,821
synchronized void asyncReconnect ( final URI reconnectUri , String authKey , final ReconnectCallback callback ) { if ( getState ( ) != State . OPEN ) { return ; } final ProtocolConnectionConfiguration config = ProtocolConnectionConfiguration . copy ( configuration ) ; config . setCallbackHandler ( createClientCallbackH...
This continuously tries to reconnect in a separate thread and will only stop if the connection was established successfully or the server gets shutdown . If there is currently a reconnect task active the connection paramaters and callback will get updated .
145,822
synchronized boolean doReConnect ( ) throws IOException { if ( connectionManager . isConnected ( ) ) { try { final Future < Long > result = channelHandler . executeRequest ( ManagementPingRequest . INSTANCE , null ) . getResult ( ) ; result . get ( 15 , TimeUnit . SECONDS ) ; return true ; } catch ( Exception e ) { Ser...
Reconnect to the HC .
145,823
synchronized void started ( ) { try { if ( isConnected ( ) ) { channelHandler . executeRequest ( new ServerStartedRequest ( ) , null ) . getResult ( ) . await ( ) ; } } catch ( Exception e ) { ServerLogger . AS_ROOT_LOGGER . debugf ( e , "failed to send started notification" ) ; } }
Send the started notification
145,824
public int executeTask ( final TransactionalProtocolClient . TransactionalOperationListener < ServerOperation > listener , final ServerUpdateTask task ) { try { return execute ( listener , task . getServerIdentity ( ) , task . getOperation ( ) ) ; } catch ( OperationFailedException e ) { final ServerIdentity identity =...
Execute a server task .
145,825
protected boolean executeOperation ( final TransactionalProtocolClient . TransactionalOperationListener < ServerOperation > listener , TransactionalProtocolClient client , final ServerIdentity identity , final ModelNode operation , final OperationResultTransformer transformer ) { if ( client == null ) { return false ; ...
Execute the operation .
145,826
void recordPreparedOperation ( final TransactionalProtocolClient . PreparedOperation < ServerTaskExecutor . ServerOperation > preparedOperation ) { recordPreparedTask ( new ServerTaskExecutor . ServerPreparedResponse ( preparedOperation ) ) ; }
Record a prepare operation .
145,827
void recordOperationPrepareTimeout ( final BlockingQueueOperationListener . FailedOperation < ServerOperation > failedOperation ) { recordPreparedTask ( new ServerTaskExecutor . ServerPreparedResponse ( failedOperation ) ) ; ServerIdentity identity = failedOperation . getOperation ( ) . getIdentity ( ) ; AsyncFuture < ...
Record a prepare operation timeout .
145,828
public static ServiceController < InstallationManager > installService ( ServiceTarget serviceTarget ) { final InstallationManagerService service = new InstallationManagerService ( ) ; return serviceTarget . addService ( InstallationManagerService . NAME , service ) . addDependency ( JBOSS_PRODUCT_CONFIG_SERVICE , Prod...
Install the installation manager service .
145,829
public Method getMethod ( Method method ) { return getMethod ( method . getReturnType ( ) , method . getName ( ) , method . getParameterTypes ( ) ) ; }
Get the canonical method declared on this object .
145,830
public Collection < Method > getAllMethods ( String name ) { final Map < ParamList , Map < Class < ? > , Method > > nameMap = methods . get ( name ) ; if ( nameMap == null ) { return Collections . emptySet ( ) ; } final Collection < Method > methods = new ArrayList < Method > ( ) ; for ( Map < Class < ? > , Method > ma...
Get a collection of methods declared on this object by method name .
145,831
public Collection < Method > getAllMethods ( String name , int paramCount ) { final Map < ParamList , Map < Class < ? > , Method > > nameMap = methods . get ( name ) ; if ( nameMap == null ) { return Collections . emptySet ( ) ; } final Collection < Method > methods = new ArrayList < Method > ( ) ; for ( Map < Class < ...
Get a collection of methods declared on this object by method name and parameter count .
145,832
public static ServiceActivator create ( final ModelNode endpointConfig , final URI managementURI , final String serverName , final String serverProcessName , final String authKey , final boolean managementSubsystemEndpoint , final Supplier < SSLContext > sslContextSupplier ) { return new DomainServerCommunicationServic...
Create a new service activator for the domain server communication services .
145,833
public InetSocketAddress getMulticastSocketAddress ( ) { if ( multicastAddress == null ) { throw MESSAGES . noMulticastBinding ( name ) ; } return new InetSocketAddress ( multicastAddress , multicastPort ) ; }
Get the multicast socket address .
145,834
public ServerSocket createServerSocket ( ) throws IOException { final ServerSocket socket = getServerSocketFactory ( ) . createServerSocket ( name ) ; socket . bind ( getSocketAddress ( ) ) ; return socket ; }
Create and bind a server socket
145,835
public static void registerDeploymentResource ( final DeploymentResourceSupport deploymentResourceSupport , final LoggingConfigurationService service ) { final PathElement base = PathElement . pathElement ( "configuration" , service . getConfiguration ( ) ) ; deploymentResourceSupport . getDeploymentSubModel ( LoggingE...
Registers the deployment resources needed .
145,836
public static String constructUrl ( final HttpServerExchange exchange , final String path ) { final HeaderMap headers = exchange . getRequestHeaders ( ) ; String host = headers . getFirst ( HOST ) ; String protocol = exchange . getConnection ( ) . getSslSessionInfo ( ) != null ? "https" : "http" ; return protocol + ":/...
Based on the current request represented by the HttpExchange construct a complete URL for the supplied path .
145,837
public boolean matches ( Property property ) { return property . getName ( ) . equals ( key ) && ( value == WILDCARD_VALUE || property . getValue ( ) . asString ( ) . equals ( value ) ) ; }
Determine whether the given property matches this element . A property matches this element when property name and this key are equal values are equal or this element value is a wildcard .
145,838
public boolean matches ( PathElement pe ) { return pe . key . equals ( key ) && ( isWildcard ( ) || pe . value . equals ( value ) ) ; }
Determine whether the given element matches this element . An element matches this element when keys are equal values are equal or this element value is a wildcard .
145,839
public void setAppender ( final Appender appender ) { if ( this . appender != null ) { close ( ) ; } checkAccess ( this ) ; if ( applyLayout && appender != null ) { final Formatter formatter = getFormatter ( ) ; appender . setLayout ( formatter == null ? null : new FormatterLayout ( formatter ) ) ; } appenderUpdater . ...
Set the Log4j appender .
145,840
private ModelNode createOSNode ( ) throws OperationFailedException { String osName = getProperty ( "os.name" ) ; final ModelNode os = new ModelNode ( ) ; if ( osName != null && osName . toLowerCase ( ) . contains ( "linux" ) ) { try { os . set ( GnuLinuxDistribution . discover ( ) ) ; } catch ( IOException ex ) { throw...
Create a ModelNode representing the operating system the instance is running on .
145,841
private ModelNode createJVMNode ( ) throws OperationFailedException { ModelNode jvm = new ModelNode ( ) . setEmptyObject ( ) ; jvm . get ( NAME ) . set ( getProperty ( "java.vm.name" ) ) ; jvm . get ( JAVA_VERSION ) . set ( getProperty ( "java.vm.specification.version" ) ) ; jvm . get ( JVM_VERSION ) . set ( getPropert...
Create a ModelNode representing the JVM the instance is running on .
145,842
private ModelNode createCPUNode ( ) throws OperationFailedException { ModelNode cpu = new ModelNode ( ) . setEmptyObject ( ) ; cpu . get ( ARCH ) . set ( getProperty ( "os.arch" ) ) ; cpu . get ( AVAILABLE_PROCESSORS ) . set ( ProcessorInfo . availableProcessors ( ) ) ; return cpu ; }
Create a ModelNode representing the CPU the instance is running on .
145,843
private String getProperty ( String name ) { return System . getSecurityManager ( ) == null ? System . getProperty ( name ) : doPrivileged ( new ReadPropertyAction ( name ) ) ; }
Get a System property by its name .
145,844
public void explore ( ) { if ( isLeaf ) return ; if ( isGeneric ) return ; removeAllChildren ( ) ; try { String addressPath = addressPath ( ) ; ModelNode resourceDesc = executor . doCommand ( addressPath + ":read-resource-description" ) ; resourceDesc = resourceDesc . get ( "result" ) ; ModelNode response = executor . ...
Refresh children using read - resource operation .
145,845
public String addressPath ( ) { if ( isLeaf ) { ManagementModelNode parent = ( ManagementModelNode ) getParent ( ) ; return parent . addressPath ( ) ; } StringBuilder builder = new StringBuilder ( ) ; for ( Object pathElement : getUserObjectPath ( ) ) { UserObject userObj = ( UserObject ) pathElement ; if ( userObj . i...
Get the DMR path for this node . For leaves the DMR path is the path of its parent .
145,846
private static boolean mayBeIPv6Address ( String input ) { if ( input == null ) { return false ; } boolean result = false ; int colonsCounter = 0 ; int length = input . length ( ) ; for ( int i = 0 ; i < length ; i ++ ) { char c = input . charAt ( i ) ; if ( c == '.' || c == '%' ) { break ; } if ( ! ( ( c >= '0' && c <...
Heuristic check if string might be an IPv6 address .
145,847
public static void initializeDomainRegistry ( final TransformerRegistry registry ) { registerRootTransformers ( registry ) ; registerChainedManagementTransformers ( registry ) ; registerChainedServerGroupTransformers ( registry ) ; registerProfileTransformers ( registry ) ; registerSocketBindingGroupTransformers ( regi...
Initialize the domain registry .
145,848
static boolean killProcess ( final String processName , int id ) { int pid ; try { pid = processUtils . resolveProcessId ( processName , id ) ; if ( pid > 0 ) { try { Runtime . getRuntime ( ) . exec ( processUtils . getKillCommand ( pid ) ) ; return true ; } catch ( Throwable t ) { ProcessLogger . ROOT_LOGGER . debugf ...
Try to kill a given process .
145,849
public Launcher addEnvironmentVariable ( final String key , final String value ) { env . put ( key , value ) ; return this ; }
Adds an environment variable to the process being created .
145,850
private void buildTransformers_3_0 ( ResourceTransformationDescriptionBuilder builder ) { builder . addChildResource ( ConnectorResource . PATH ) . getAttributeBuilder ( ) . setDiscard ( DiscardAttributeChecker . UNDEFINED , ConnectorCommon . SASL_AUTHENTICATION_FACTORY , ConnectorResource . SSL_CONTEXT ) . addRejectCh...
EAP 7 . 0
145,851
private void buildTransformers_4_0 ( ResourceTransformationDescriptionBuilder builder ) { EndPointWriteTransformer endPointWriteTransformer = new EndPointWriteTransformer ( ) ; builder . getAttributeBuilder ( ) . setDiscard ( DiscardAttributeChecker . ALWAYS , endpointAttrArray ) . end ( ) . addOperationTransformationO...
EAP 7 . 1
145,852
ServerStatus getState ( ) { final InternalState requiredState = this . requiredState ; final InternalState state = internalState ; if ( requiredState == InternalState . FAILED ) { return ServerStatus . FAILED ; } switch ( state ) { case STOPPED : return ServerStatus . STOPPED ; case SERVER_STARTED : return ServerStatus...
Determine the current state the server is in .
145,853
synchronized boolean reload ( int permit , boolean suspend ) { return internalSetState ( new ReloadTask ( permit , suspend ) , InternalState . SERVER_STARTED , InternalState . RELOADING ) ; }
Reload a managed server .
145,854
synchronized void start ( final ManagedServerBootCmdFactory factory ) { final InternalState required = this . requiredState ; if ( required == InternalState . SERVER_STARTED ) { return ; } if ( required != InternalState . FAILED ) { final InternalState current = this . internalState ; if ( current != required ) { throw...
Start a managed server .
145,855
synchronized void stop ( Integer timeout ) { final InternalState required = this . requiredState ; if ( required != InternalState . STOPPED ) { this . requiredState = InternalState . STOPPED ; ROOT_LOGGER . stoppingServer ( serverName ) ; if ( internalState == InternalState . SERVER_STARTED ) { internalSetState ( new S...
Stop a managed server .
145,856
synchronized void reconnectServerProcess ( final ManagedServerBootCmdFactory factory ) { if ( this . requiredState != InternalState . SERVER_STARTED ) { this . bootConfiguration = factory ; this . requiredState = InternalState . SERVER_STARTED ; ROOT_LOGGER . reconnectingServer ( serverName ) ; internalSetState ( new R...
Try to reconnect to a started server .
145,857
synchronized void removeServerProcess ( ) { this . requiredState = InternalState . STOPPED ; internalSetState ( new ProcessRemoveTask ( ) , InternalState . STOPPED , InternalState . PROCESS_REMOVING ) ; }
On host controller reload remove a not running server registered in the process controller declared as down .
145,858
synchronized void setServerProcessStopping ( ) { this . requiredState = InternalState . STOPPED ; internalSetState ( null , InternalState . STOPPED , InternalState . PROCESS_STOPPING ) ; }
On host controller reload remove a not running server registered in the process controller declared as stopping .
145,859
boolean awaitState ( final InternalState expected ) { synchronized ( this ) { final InternalState initialRequired = this . requiredState ; for ( ; ; ) { final InternalState required = this . requiredState ; if ( required == InternalState . FAILED ) { return false ; } else if ( initialRequired != required ) { return fal...
Await a state .
145,860
boolean processUnstable ( ) { boolean change = ! unstable ; if ( change ) { unstable = true ; HostControllerLogger . ROOT_LOGGER . managedServerUnstable ( serverName ) ; } return change ; }
Notification that the process has become unstable .
145,861
boolean callbackUnregistered ( final TransactionalProtocolClient old , final boolean shuttingDown ) { protocolClient . disconnected ( old ) ; synchronized ( this ) { if ( ! shuttingDown && requiredState == InternalState . SERVER_STARTED ) { final InternalState state = internalState ; if ( state == InternalState . PROCE...
Unregister the mgmt channel .
145,862
synchronized void processFinished ( ) { final InternalState required = this . requiredState ; final InternalState state = this . internalState ; if ( required == InternalState . STOPPED && state == InternalState . PROCESS_STOPPING ) { finishTransition ( InternalState . PROCESS_STOPPING , InternalState . PROCESS_STOPPED...
Notification that the server process finished .
145,863
synchronized void transitionFailed ( final InternalState state ) { final InternalState current = this . internalState ; if ( state == current ) { switch ( current ) { case PROCESS_ADDING : this . internalState = InternalState . PROCESS_STOPPED ; break ; case PROCESS_STARTED : internalSetState ( getTransitionTask ( Inte...
Notification that a state transition failed .
145,864
private synchronized void finishTransition ( final InternalState current , final InternalState next ) { internalSetState ( getTransitionTask ( next ) , current , next ) ; transition ( ) ; }
Finish a state transition from a notification .
145,865
public void registerCapabilities ( ManagementResourceRegistration resourceRegistration ) { if ( capabilities != null ) { for ( RuntimeCapability c : capabilities ) { resourceRegistration . registerCapability ( c ) ; } } if ( incorporatingCapabilities != null ) { resourceRegistration . registerIncorporatingCapabilities ...
Register capabilities associated with this resource .
145,866
@ SuppressWarnings ( "deprecation" ) protected void registerAddOperation ( final ManagementResourceRegistration registration , final OperationStepHandler handler , OperationEntry . Flag ... flags ) { if ( handler instanceof DescriptionProvider ) { registration . registerOperationHandler ( getOperationDefinition ( Model...
Registers add operation
145,867
private static void handlePing ( final Channel channel , final ManagementProtocolHeader header ) throws IOException { final ManagementProtocolHeader response = new ManagementPongHeader ( header . getVersion ( ) ) ; final MessageOutputStream output = channel . writeMessage ( ) ; try { writeHeader ( response , output ) ;...
Handle a simple ping request .
145,868
public static String resolveOrOriginal ( String input ) { try { return resolve ( input , true ) ; } catch ( UnresolvedExpressionException e ) { return input ; } }
Attempts to substitute all the found expressions in the input with their corresponding resolved values . If any of the found expressions failed to resolve or if the input does not contain any expression the input is returned as is .
145,869
private OperationResponse executeForResult ( final OperationExecutionContext executionContext ) throws IOException { try { return execute ( executionContext ) . get ( ) ; } catch ( Exception e ) { throw new IOException ( e ) ; } }
Execute for result .
145,870
public static LayersConfig getLayersConfig ( final File repoRoot ) throws IOException { final File layersList = new File ( repoRoot , LAYERS_CONF ) ; if ( ! layersList . exists ( ) ) { return new LayersConfig ( ) ; } final Properties properties = PatchUtils . loadProperties ( layersList ) ; return new LayersConfig ( pr...
Process the layers . conf file .
145,871
private boolean parseRemoteDomainControllerAttributes_1_5 ( final XMLExtendedStreamReader reader , final ModelNode address , final List < ModelNode > list , boolean allowDiscoveryOptions ) throws XMLStreamException { final ModelNode update = new ModelNode ( ) ; update . get ( OP_ADDR ) . set ( address ) ; update . get ...
The only difference between version 1 . 5 and 1 . 6 of the schema were to make is possible to define discovery options this resulted in the host and port attributes becoming optional - this method also indicates if discovery options are required where the host and port were not supplied .
145,872
public static RemoteProxyController create ( final TransactionalProtocolClient client , final PathAddress pathAddress , final ProxyOperationAddressTranslator addressTranslator , final ModelVersion targetKernelVersion ) { return new RemoteProxyController ( client , pathAddress , addressTranslator , targetKernelVersion )...
Create a new remote proxy controller .
145,873
public static RemoteProxyController create ( final ManagementChannelHandler channelAssociation , final PathAddress pathAddress , final ProxyOperationAddressTranslator addressTranslator ) { final TransactionalProtocolClient client = TransactionalProtocolHandlers . createClient ( channelAssociation ) ; return create ( cl...
Creates a new remote proxy controller using an existing channel .
145,874
public ModelNode translateOperationForProxy ( final ModelNode op ) { return translateOperationForProxy ( op , PathAddress . pathAddress ( op . get ( OP_ADDR ) ) ) ; }
Translate the operation address .
145,875
private void flush ( final boolean propagate ) throws IOException { final int avail = baseNCodec . available ( context ) ; if ( avail > 0 ) { final byte [ ] buf = new byte [ avail ] ; final int c = baseNCodec . readResults ( buf , 0 , avail , context ) ; if ( c > 0 ) { out . write ( buf , 0 , c ) ; } } if ( propagate )...
Flushes this output stream and forces any buffered output bytes to be written out to the stream . If propagate is true the wrapped stream will also be flushed .
145,876
public void close ( ) throws IOException { if ( doEncode ) { baseNCodec . encode ( singleByte , 0 , EOF , context ) ; } else { baseNCodec . decode ( singleByte , 0 , EOF , context ) ; } flush ( ) ; out . close ( ) ; }
Closes this output stream and releases any system resources associated with the stream .
145,877
private ModelNode resolveExpressionsRecursively ( final ModelNode node ) throws OperationFailedException { if ( ! node . isDefined ( ) ) { return node ; } ModelType type = node . getType ( ) ; ModelNode resolved ; if ( type == ModelType . EXPRESSION ) { resolved = resolveExpressionStringRecursively ( node . asExpressio...
Examine the given model node resolving any expressions found within including within child nodes .
145,878
private ModelNode resolveExpressionStringRecursively ( final String expressionString , final boolean ignoreDMRResolutionFailure , final boolean initial ) throws OperationFailedException { ParseAndResolveResult resolved = parseAndResolve ( expressionString , ignoreDMRResolutionFailure ) ; if ( resolved . recursive ) { r...
Attempt to resolve the given expression string recursing if resolution of one string produces another expression .
145,879
private String resolveExpressionString ( final String unresolvedString ) throws OperationFailedException { assert unresolvedString . startsWith ( "${" ) && unresolvedString . endsWith ( "}" ) ; String result = unresolvedString ; ModelNode resolveNode = new ModelNode ( new ValueExpression ( unresolvedString ) ) ; resolv...
Resolve the given string using any plugin and the DMR resolve method
145,880
private static XMLStreamException unexpectedElement ( final XMLStreamReader reader ) { return SecurityManagerLogger . ROOT_LOGGER . unexpectedElement ( reader . getName ( ) , reader . getLocation ( ) ) ; }
Gets an exception reporting an unexpected XML element .
145,881
private static XMLStreamException unexpectedAttribute ( final XMLStreamReader reader , final int index ) { return SecurityManagerLogger . ROOT_LOGGER . unexpectedAttribute ( reader . getAttributeName ( index ) , reader . getLocation ( ) ) ; }
Gets an exception reporting an unexpected XML attribute .
145,882
public static byte [ ] storeContentAndTransformOperation ( OperationContext context , ModelNode operation , ContentRepository contentRepository ) throws IOException , OperationFailedException { if ( ! operation . hasDefined ( CONTENT ) ) { throw createFailureException ( DomainControllerLogger . ROOT_LOGGER . invalidCon...
Store the deployment contents and attach a transformed slave operation to the operation context .
145,883
public static byte [ ] explodeContentAndTransformOperation ( OperationContext context , ModelNode operation , ContentRepository contentRepository ) throws OperationFailedException , ExplodedContentException { final Resource deploymentResource = context . readResource ( PathAddress . EMPTY_ADDRESS ) ; ModelNode contentI...
Explode the deployment contents and attach a transformed slave operation to the operation context .
145,884
public static byte [ ] addContentToExplodedAndTransformOperation ( OperationContext context , ModelNode operation , ContentRepository contentRepository ) throws OperationFailedException , ExplodedContentException { final Resource deploymentResource = context . readResource ( PathAddress . EMPTY_ADDRESS ) ; ModelNode co...
Add contents to the deployment and attach a transformed slave operation to the operation context .
145,885
public static byte [ ] removeContentFromExplodedAndTransformOperation ( OperationContext context , ModelNode operation , ContentRepository contentRepository ) throws OperationFailedException , ExplodedContentException { final Resource deploymentResource = context . readResource ( PathAddress . EMPTY_ADDRESS ) ; ModelNo...
Remove contents from the deployment and attach a transformed slave operation to the operation context .
145,886
public static byte [ ] synchronizeSlaveHostController ( ModelNode operation , final PathAddress address , HostFileRepository fileRepository , ContentRepository contentRepository , boolean backup , byte [ ] oldHash ) { ModelNode operationContentItem = operation . get ( DeploymentAttributes . CONTENT_RESOURCE_ALL . getNa...
Synchronize the required files to a slave HC from the master DC if this is required .
145,887
public void deploy ( DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext . getDeploymentUnit ( ) ; for ( ResourceRoot resourceRoot : DeploymentUtils . allResourceRoots ( deploymentUnit ) ) { ResourceRootIndexer . indexResourceRoot ( resourc...
Process this deployment for annotations . This will use an annotation indexer to create an index of all annotations found in this deployment and attach it to the deployment unit context .
145,888
public static File newFile ( File baseDir , String ... segments ) { File f = baseDir ; for ( String segment : segments ) { f = new File ( f , segment ) ; } return f ; }
Return a new File object based on the baseDir and the segments .
145,889
public PasswordCheckResult check ( boolean isAdminitrative , String userName , String password ) { List < PasswordRestriction > passwordValuesRestrictions = getPasswordRestrictions ( ) ; final PasswordStrengthCheckResult strengthResult = this . passwordStrengthChecker . check ( userName , password , passwordValuesRestr...
Method which performs strength checks on password . It returns outcome which can be used by CLI .
145,890
public String getCmdLineArg ( ) { StringBuilder builder = new StringBuilder ( " --server-groups=" ) ; boolean foundSelected = false ; for ( JCheckBox serverGroup : serverGroups ) { if ( serverGroup . isSelected ( ) ) { foundSelected = true ; builder . append ( serverGroup . getText ( ) ) ; builder . append ( "," ) ; }...
Return the command line argument
145,891
public static boolean isCompleteZip ( File file ) throws IOException , NonScannableZipException { FileChannel channel = null ; try { channel = new FileInputStream ( file ) . getChannel ( ) ; long size = channel . size ( ) ; if ( size < ENDLEN ) { return false ; } else if ( validateEndRecord ( file , channel , size - EN...
Scans the given file looking for a complete zip file format end of central directory record .
145,892
private static boolean scanForEndSig ( File file , FileChannel channel ) throws IOException , NonScannableZipException { ByteBuffer bb = getByteBuffer ( CHUNK_SIZE ) ; long start = channel . size ( ) ; long end = Math . max ( 0 , start - MAX_REVERSE_SCAN ) ; long channelPos = Math . max ( 0 , start - CHUNK_SIZE ) ; lon...
Boyer Moore scan that proceeds backwards from the end of the file looking for ENDSIG
145,893
static void sendFailedResponse ( final ManagementRequestContext < RegistrationContext > context , final byte errorCode , final String message ) throws IOException { final ManagementResponseHeader header = ManagementResponseHeader . create ( context . getRequestHeader ( ) ) ; final FlushableDataOutput output = context ....
Send a failed operation response .
145,894
public static boolean isOperationDefined ( final ModelNode operation ) { for ( final AttributeDefinition def : ROOT_ATTRIBUTES ) { if ( operation . hasDefined ( def . getName ( ) ) ) { return true ; } } return false ; }
Test whether the operation has a defined criteria attribute .
145,895
private static ListAttributeDefinition wrapAsList ( final AttributeDefinition def ) { final ListAttributeDefinition list = new ListAttributeDefinition ( new SimpleListAttributeDefinition . Builder ( def . getName ( ) , def ) . setElementValidator ( def . getValidator ( ) ) ) { public ModelNode getNoTextDescription ( bo...
Wrap a simple attribute def as list .
145,896
private static int resolveDomainTimeoutAdder ( ) { String propValue = WildFlySecurityManager . getPropertyPrivileged ( DOMAIN_TEST_SYSTEM_PROPERTY , DEFAULT_DOMAIN_TIMEOUT_STRING ) ; if ( sysPropDomainValue == null || ! sysPropDomainValue . equals ( propValue ) ) { sysPropDomainValue = propValue ; int number = - 1 ; tr...
Allows testsuites to shorten the domain timeout adder
145,897
public TransformersSubRegistration getDomainRegistration ( final ModelVersionRange range ) { final PathAddress address = PathAddress . EMPTY_ADDRESS ; return new TransformersSubRegistrationImpl ( range , domain , address ) ; }
Get the sub registry for the domain .
145,898
public TransformersSubRegistration getHostRegistration ( final ModelVersionRange range ) { final PathAddress address = PathAddress . EMPTY_ADDRESS . append ( HOST ) ; return new TransformersSubRegistrationImpl ( range , domain , address ) ; }
Get the sub registry for the hosts .
145,899
public TransformersSubRegistration getServerRegistration ( final ModelVersionRange range ) { final PathAddress address = PathAddress . EMPTY_ADDRESS . append ( HOST , SERVER ) ; return new TransformersSubRegistrationImpl ( range , domain , address ) ; }
Get the sub registry for the servers .