本文整理了Java中org.qi4j.api.injection.scope.This
类的一些代码示例,展示了This
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。This
类的具体详情如下:
包路径:org.qi4j.api.injection.scope.This
类名称:This
暂无
代码示例来源:origin: org.qi4j.core/org.qi4j.core.testsupport
public static abstract class AnotherValueMixin
implements AnotherValue
{
@This
private AnotherValueInternalState internalState;
@Override
public String internalVal()
{
return internalState.val2().get();
}
}
代码示例来源:origin: org.qi4j.library/org.qi4j.library.logging
public TraceConcern( @This Composite thisComposite )
{
super( thisComposite );
}
代码示例来源:origin: org.qi4j.library/org.qi4j.library.logging
public TraceAllConcern( @This Composite composite )
{
super( composite );
}
代码示例来源:origin: org.codeartisans.qipki/qipki-ca
public class X509Mixin
implements X509Behavior
{
@This
private X509 state;
@Override
public X509Certificate x509Certificate()
{
try {
return ( X509Certificate ) new PEMReader( new StringReader( state.pem().get() ) ).readObject();
} catch ( IOException ex ) {
throw new QiPkiFailure( "Unable to read X509 pem", ex );
}
}
}
代码示例来源:origin: org.qi4j.core/org.qi4j.core.testsupport
public static class MyServiceMixin
implements MyService
{
@This
private Configuration<ConfigSerializationConfig> config;
@Override
public String hostIp()
{
return config.get().host().get().ip().get();
}
@Override
public Integer hostPort()
{
return config.get().host().get().port().get();
}
@Override
public String name()
{
return config.get().name().get();
}
}
代码示例来源:origin: org.codeartisans.qipki/org.qi4j.library.uowfile
class Mixin
implements Lifecycle
{
@This
private HasUoWFile hasUoWFile;
@Override
public void create()
throws LifecycleException
{
// NOOP
}
@Override
public void remove()
throws LifecycleException
{
// We use the managed file so that if the UoW gets discarded the file will be restored
File file = hasUoWFile.managedFile();
if ( file.exists() && !file.delete() ) {
throw new LifecycleException( "Unable to delete existing file: " + file );
}
}
}
代码示例来源:origin: org.qi4j.library/org.qi4j.library.http
public class JettyMixin
extends AbstractJettyMixin
{
@This
private Configuration<JettyConfiguration> configuration;
public JettyMixin( @This Identity meAsIdentity,
@Service Server jettyServer,
@Service Iterable<ServiceReference<ServletContextListener>> contextListeners,
@Service Iterable<ServiceReference<Servlet>> servlets,
@Service Iterable<ServiceReference<Filter>> filters,
@Optional @Service MBeanServer mBeanServer )
{
super( meAsIdentity.identity().get(), jettyServer, contextListeners, servlets, filters, mBeanServer );
}
@Override
protected JettyConfiguration configuration()
{
return configuration.get();
}
@Override
protected Protocol servedProtocol()
{
return Protocol.http;
}
}
代码示例来源:origin: org.codeartisans.swing-on-steroids/sos-core
abstract class Mixin
implements WorkQueueComposite
{
@This
private Configuration<WorkQueueConfiguration> config;
private DefaultWorkQueue delegate;
@Override
public void enqueue( Runnable runnable )
{
ensureDelegate().enqueue( runnable );
}
@Override
public void enqueue( Runnable runnable, ErrorCallbackAdapter<RuntimeException> errorCallback )
{
ensureDelegate().enqueue( runnable, errorCallback );
}
private WorkQueue ensureDelegate()
{
if ( delegate == null ) {
WorkQueueConfiguration cfg = config.configuration();
delegate = new DefaultWorkQueue( cfg.name().get(), cfg.size().get() );
}
return delegate;
}
}
代码示例来源:origin: org.codeartisans.qipki/org.qi4j.library.uowfile
public class Mixin
implements Lifecycle
{
@This
private HasUoWFiles<?> hasUoWFiles;
@Override
public void create()
throws LifecycleException
{
// NOOP
}
@Override
public void remove()
throws LifecycleException
{
// We use the managed files so that if the UoW gets discarded the files will be restored
List<File> errors = new ArrayList<File>();
for ( File eachFile : hasUoWFiles.managedFiles() ) {
if ( eachFile.exists() ) {
if ( !eachFile.delete() ) {
errors.add( eachFile );
}
}
}
if ( !errors.isEmpty() ) {
throw new LifecycleException( "Unable to delete existing files: " + errors );
}
}
}
代码示例来源:origin: org.qi4j.core/org.qi4j.core.testsupport
@This
MockRepository mockRepository;
代码示例来源:origin: org.qi4j.library/org.qi4j.library.rdf
public static abstract class RdbmsRepositoryMixin
implements RdbmsRepositoryService
@This
private Configuration<RdbmsRepositoryConfiguration> configuration;
代码示例来源:origin: org.codeartisans.qipki/qipki-ca
static abstract class Mixin
implements CRL, UoWFileLocator
{
@Service
private CRLFileService crlFileService;
@This
private CRL me;
@Override
public File locateAttachedFile()
{
return crlFileService.getCRLFile( me );
}
}
代码示例来源:origin: org.qi4j.library/org.qi4j.library.scheduler
protected ThreadFactory( @This SchedulerService me )
{
SecurityManager sm = System.getSecurityManager();
group = ( sm != null ) ? sm.getThreadGroup() : Thread.currentThread().getThreadGroup();
namePrefix = me.identity().get() + "-P" + POOL_NUMBER.getAndIncrement() + "W";
}
代码示例来源:origin: org.codeartisans.qipki/org.qi4j.library.uowfile
class Mixin
implements HasUoWFile
{
@Service
private UoWFileFactory uowFileFactory;
@This
private UoWFileLocator locator;
@Override
public File attachedFile()
{
return locator.locateAttachedFile();
}
@Override
public File managedFile()
{
return uowFileFactory.createCurrentUoWFile( locator.locateAttachedFile() ).asFile();
}
}
代码示例来源:origin: org.qi4j.library/org.qi4j.library.scheduler
private Module module;
@This
private TimelineScheduleState state;
@This
private Schedule me;
代码示例来源:origin: org.codeartisans.qipki/qipki-ca-http
@This
@Optional
private Configuration<RestApiConfiguration> config;
代码示例来源:origin: org.codeartisans.qipki/org.qi4j.library.uowfile
@This
private UoWFilesLocator locator;
代码示例来源:origin: org.qi4j.library/org.qi4j.library.sql-liquibase
@This
Configuration<LiquibaseConfiguration> config;
代码示例来源:origin: org.qi4j.library/org.qi4j.library.scheduler
implements Schedule
@This
private TimelineScheduleState state;
代码示例来源:origin: org.qi4j.library/org.qi4j.library.logging
public SimpleLogConcern( @This Composite composite )
{
this.composite = composite;
Class<?> type = first( Qi4j.FUNCTION_DESCRIPTOR_FOR.map( composite ).types() );
category = type.getName();
}
内容来源于网络,如有侵权,请联系作者删除!