Fabric3 Java

org.fabric3.java
Class JavaComponent<T>

java.lang.Object
  extended by org.fabric3.spi.AbstractLifecycle
      extended by org.fabric3.pojo.implementation.PojoComponent<T>
          extended by org.fabric3.java.JavaComponent<T>
Type Parameters:
T - the implementation class for the defined component
All Implemented Interfaces:
org.fabric3.spi.component.AtomicComponent<T>, org.fabric3.spi.component.Component, org.fabric3.spi.Lifecycle

public class JavaComponent<T>
extends org.fabric3.pojo.implementation.PojoComponent<T>

The runtime instantiation of Java component implementations

Version:
$Revision: 1382 $ $Date: 2007-09-23 21:08:40 +0100 (Sun, 23 Sep 2007) $

Field Summary
 
Fields inherited from class org.fabric3.spi.AbstractLifecycle
lifecycleState
 
Fields inherited from interface org.fabric3.spi.Lifecycle
CONFIG_ERROR, ERROR, INITIALIZED, INITIALIZING, RUNNING, STOPPED, STOPPING, UNINITIALIZED
 
Constructor Summary
JavaComponent(URI componentId, org.fabric3.spi.component.InstanceFactoryProvider<T> instanceFactoryProvider, org.fabric3.spi.component.ScopeContainer<?> scopeContainer, URI groupId, int initLevel, long maxIdleTime, long maxAge, org.fabric3.spi.wire.ProxyService proxyService, Map<String,org.fabric3.spi.ObjectFactory<?>> propertyFactories, Map<String,org.fabric3.pojo.injection.MultiplicityObjectFactory<?>> referenceFactories)
          Constructor for a Java Component.
 
Method Summary
<B,R extends org.osoa.sca.CallableReference<B>>
R
cast(B target)
           
<B> B
getProperty(Class<B> type, String propertyName)
           
<B> B
getService(Class<B> businessInterface, String referenceName)
           
<B> org.osoa.sca.ServiceReference<B>
getServiceReference(Class<B> businessInterface, String referenceName)
           
 
Methods inherited from class org.fabric3.pojo.implementation.PojoComponent
attachReferenceToTarget, createInstanceWrapper, createObjectFactory, getComponentContext, getDefaultPropertyValues, getGerenricMemberType, getGroupId, getImplementationClass, getInitLevel, getMaxAge, getMaxIdleTime, getMemberType, getScopeContainer, getUri, isEagerInit, setDefaultPropertyValues, setObjectFactory, start, stop, toString
 
Methods inherited from class org.fabric3.spi.AbstractLifecycle
getLifecycleState, setLifecycleState
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.fabric3.spi.Lifecycle
getLifecycleState
 

Constructor Detail

JavaComponent

public JavaComponent(URI componentId,
                     org.fabric3.spi.component.InstanceFactoryProvider<T> instanceFactoryProvider,
                     org.fabric3.spi.component.ScopeContainer<?> scopeContainer,
                     URI groupId,
                     int initLevel,
                     long maxIdleTime,
                     long maxAge,
                     org.fabric3.spi.wire.ProxyService proxyService,
                     Map<String,org.fabric3.spi.ObjectFactory<?>> propertyFactories,
                     Map<String,org.fabric3.pojo.injection.MultiplicityObjectFactory<?>> referenceFactories)
Constructor for a Java Component.

Parameters:
componentId - the component's uri
instanceFactoryProvider - the provider for the instance factory
scopeContainer - the container for the component's implementation scope
groupId - the component group this component belongs to
initLevel - the initialization level
maxIdleTime - the time after which idle instances of this component can be expired
maxAge - the time after which instances of this component can be expired
proxyService - the service used to create reference proxies
propertyFactories - map of factories for property values
Method Detail

getService

public <B> B getService(Class<B> businessInterface,
                        String referenceName)

getServiceReference

public <B> org.osoa.sca.ServiceReference<B> getServiceReference(Class<B> businessInterface,
                                                                String referenceName)

getProperty

public <B> B getProperty(Class<B> type,
                         String propertyName)
              throws org.fabric3.spi.ObjectCreationException
Throws:
org.fabric3.spi.ObjectCreationException

cast

public <B,R extends org.osoa.sca.CallableReference<B>> R cast(B target)

Fabric3 Java

Copyright © 2007 Fabric3 project contributors. All Rights Reserved.
Licensed under the terms of the Apache License 2.0.