org.apache.ignite.internal.processors.resource

## Class GridResourceLoggerInjector

- java.lang.Object
- - org.apache.ignite.internal.processors.resource.GridResourceLoggerInjector

    public class GridResourceLoggerInjector
    extends Object

### Constructor Summary

Constructors
Constructor and Description
`GridResourceLoggerInjector(IgniteLogger rsrc)`

### Method Summary

All Methods Instance Methods Concrete Methods
`T` `getResource()` Gets resource.
`void` `inject(org.apache.ignite.internal.processors.resource.GridResourceField field, Object target, Class<?> depCls, GridDeployment dep)` Injects resource into field.
`void` `inject(org.apache.ignite.internal.processors.resource.GridResourceMethod mtd, Object target, Class<?> depCls, GridDeployment dep)` Injects resource with a setter method.
`String` `toString()`
`void` `undeploy(GridDeployment dep)` Gracefully cleans all resources associated with deployment.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### GridResourceLoggerInjector

    public GridResourceLoggerInjector(IgniteLogger rsrc)

Parameters:
  `rsrc` - Root logger.

### Method Detail

#### inject

    public void inject(org.apache.ignite.internal.processors.resource.GridResourceField field,
                       Object target,
                       Class<?> depCls,
                       GridDeployment dep)
                throws IgniteCheckedException

Injects resource into field. Caches injected resource with the given key if needed.

Parameters:
  `field` - Field to inject.
  `target` - Target object the field belongs to.
  `depCls` - Deployed class.
  `dep` - Deployment.
Throws:
  `IgniteCheckedException` - If injection failed.

#### inject

    public void inject(org.apache.ignite.internal.processors.resource.GridResourceMethod mtd,
                       Object target,
                       Class<?> depCls,
                       GridDeployment dep)
                throws IgniteCheckedException

Injects resource with a setter method. Caches injected resource with the given key if needed.

Parameters:
  `mtd` - Setter method.
  `target` - Target object the field belongs to.
  `depCls` - Deployed class.
  `dep` - Deployment.
Throws:
  `IgniteCheckedException` - If injection failed.

#### getResource

    public T getResource()

Gets resource.

Returns:
  Resource

#### undeploy

    public void undeploy(GridDeployment dep)

Gracefully cleans all resources associated with deployment.

Parameters:
  `dep` - Deployment to undeploy.

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

2018 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 2.5.0
Release Date | : May 23 2018