本文整理汇总了Java中com.sun.jini.start.LifeCycle类的典型用法代码示例。如果您正苦于以下问题:Java LifeCycle类的具体用法?Java LifeCycle怎么用?Java LifeCycle使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
LifeCycle类属于com.sun.jini.start包,在下文中一共展示了LifeCycle类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: ESMImpl
import com.sun.jini.start.LifeCycle; //导入依赖的package包/类
/**
* Create an ESM launched from the ServiceStarter framework
*/
public ESMImpl(String[] configArgs, LifeCycle lifeCycle)
throws Exception {
this();
this.lifeCycle = lifeCycle;
this.configArgs = configArgs;
bootstrap(configArgs);
}
开发者ID:Gigaspaces,项目名称:xap-openspaces,代码行数:11,代码来源:ESMImpl.java
示例2: doCreateTransactionManager
import com.sun.jini.start.LifeCycle; //导入依赖的package包/类
@Override
protected TransactionManager doCreateTransactionManager() throws Exception {
URL mahaloConfig = ResourceLoader.getServicesConfigUrl();
Class mahaloClass = ClassUtils.forName("com.sun.jini.mahalo.TransientMahaloImpl", Thread.currentThread().getContextClassLoader());
Constructor constructor = mahaloClass.getDeclaredConstructor(String[].class, LifeCycle.class, boolean.class);
constructor.setAccessible(true);
impl = (TxnManager) constructor.newInstance(new String[] {mahaloConfig.toExternalForm()}, null, false);
proxy = impl.getLocalProxy();
return proxy;
}
开发者ID:Gigaspaces,项目名称:xap-openspaces,代码行数:12,代码来源:DistributedJiniTransactionManager.java
示例3: ServiceProvider
import com.sun.jini.start.LifeCycle; //导入依赖的package包/类
/**
* Required constructor for Jini 2 NonActivatableServiceDescriptors
*
* @param args config args
* @param lifeCycle lifecycle management
* @throws Exception
*/
public ServiceProvider(String[] args, LifeCycle lifeCycle) throws Exception {
this();
// count initialized shared providers
tally = tally + 1;
size = tally;
// load Sorcer environment properties via static initializer
Sorcer.getProperties();
serviceClassLoader = Thread.currentThread().getContextClassLoader();
final Configuration config = ConfigurationProvider.getInstance(args, serviceClassLoader);
Accessor.create(config);
delegate.setJiniConfig(config);
// inspect class loader tree
if(logger.isTraceEnabled())
com.sun.jini.start.ClassLoaderUtil.displayContextClassLoaderTree();
// System.out.println("service provider class loader: " +
// serviceClassLoader);
String providerProperties =
(String) config.getEntry(COMPONENT, "propertiesFile", String.class, "");
// setup injections by subclasses of this class
providerSetup();
// configure the provider's delegate
delegate.getProviderConfig().init(true, providerProperties);
((ScratchManagerSupport)scratchManager).setProperties(getProviderProperties());
delegate.configure(config);
providerAdmin = new ProviderAdmin(this);
providerAdmin.register();
// decide if thread management is needed for ExertionDispatcher
setupThreadManager();
init(args, lifeCycle);
logger.info("<init> (String[], LifeCycle); name = {}", this.getName());
}
开发者ID:mwsobol,项目名称:SORCER,代码行数:39,代码来源:ServiceProvider.java
示例4: Browser
import com.sun.jini.start.LifeCycle; //导入依赖的package包/类
/**
* Creates an instance with the given command line arguments and life cycle
* callback. See the package documentation for details of the command line
* arguments. The default action listener for the Exit menu item calls the
* {@link #dispose dispose} method of this instance, cancels any lookup
* service event registration lease, unexports any remote event listener,
* and calls the {@link LifeCycle#unregister unregister} method of the life
* cycle callback. The action listener can be overridden by a configuration
* entry.
*
* @param args command line arguments
* @param lc life cycle callback, or <code>null</code>.
*/
public Browser(String[] args, final LifeCycle lc)
throws ConfigurationException, LoginException, IOException {
final ActionListener exiter = new ActionListener() {
public void actionPerformed(ActionEvent ev) {
Browser.this.dispose();
cancelLease();
listen.unexport();
if (lc != null) {
lc.unregister(Browser.this);
}
System.exit(0);
}
};
final Configuration config =
ConfigurationProvider.getInstance(
args, Browser.class.getClassLoader());
LoginContext login =
(LoginContext) config.getEntry(BROWSER, "loginContext",
LoginContext.class, null);
if (login == null) {
init(exiter, config);
} else {
login.login();
try {
Subject.doAsPrivileged(
login.getSubject(),
new PrivilegedExceptionAction() {
public Object run()
throws ConfigurationException, IOException {
init(exiter, config);
return null;
}
},
null);
} catch (PrivilegedActionException pae) {
Exception e = pae.getException();
if (e instanceof ConfigurationException) {
throw (ConfigurationException) e;
}
throw (IOException) e;
}
}
}
开发者ID:apache,项目名称:river-container,代码行数:57,代码来源:Browser.java
示例5: IpcArrayProviderImpl
import com.sun.jini.start.LifeCycle; //导入依赖的package包/类
public IpcArrayProviderImpl(String[] args, LifeCycle lifeCycle)
throws Exception {
super(args, lifeCycle);
init();
}
开发者ID:mwsobol,项目名称:SORCER,代码行数:6,代码来源:IpcArrayProviderImpl.java
示例6: AdderProvider
import com.sun.jini.start.LifeCycle; //导入依赖的package包/类
public AdderProvider(String[] args, LifeCycle lifeCycle) throws Exception {
super(args, lifeCycle);
}
开发者ID:mwsobol,项目名称:SORCER,代码行数:4,代码来源:AdderProvider.java
示例7: AdderDBProvider
import com.sun.jini.start.LifeCycle; //导入依赖的package包/类
public AdderDBProvider(String[] args, LifeCycle lifeCycle) throws Exception {
super(args, lifeCycle);
}
开发者ID:mwsobol,项目名称:SORCER,代码行数:4,代码来源:AdderDBProvider.java
示例8: WorkerProvider
import com.sun.jini.start.LifeCycle; //导入依赖的package包/类
public WorkerProvider(String[] args, LifeCycle lifeCycle) throws Exception {
super(args, lifeCycle);
hostName = InetAddress.getLocalHost().getHostName();
}
开发者ID:mwsobol,项目名称:SORCER,代码行数:5,代码来源:WorkerProvider.java
示例9: ServiceCataloger
import com.sun.jini.start.LifeCycle; //导入依赖的package包/类
public ServiceCataloger(String[] args, LifeCycle lifeCycle)
throws Exception {
super(args, lifeCycle);
init();
}
开发者ID:mwsobol,项目名称:SORCER,代码行数:6,代码来源:ServiceCataloger.java
示例10: SysCallerProvider
import com.sun.jini.start.LifeCycle; //导入依赖的package包/类
public SysCallerProvider(String[] args, LifeCycle lifeCycle) throws Exception {
super(args, lifeCycle);
}
开发者ID:mwsobol,项目名称:SORCER,代码行数:4,代码来源:SysCallerProvider.java
示例11: ExertMonitor
import com.sun.jini.start.LifeCycle; //导入依赖的package包/类
public ExertMonitor(String[] args, LifeCycle lifeCycle) throws Exception {
super(args, lifeCycle);
initMonitor();
}
开发者ID:mwsobol,项目名称:SORCER,代码行数:5,代码来源:ExertMonitor.java
示例12: DatabaseProvider
import com.sun.jini.start.LifeCycle; //导入依赖的package包/类
/**
* Constructs an instance of the SORCER Object Store implementing
* EvaluationRemote. This constructor is required by Jini 2 life cycle
* management.
*
* @param args
* @param lifeCycle
* @throws Exception
*/
public DatabaseProvider(String[] args, LifeCycle lifeCycle) throws Exception {
super(args, lifeCycle);
setupDatabase();
}
开发者ID:mwsobol,项目名称:SORCER,代码行数:14,代码来源:DatabaseProvider.java
示例13: ServiceTasker
import com.sun.jini.start.LifeCycle; //导入依赖的package包/类
/**
* Required constructor for Jini 2 NonActivatableServiceDescriptors
*
* @param args
* @param lifeCycle
* @throws Exception
*/
public ServiceTasker(String[] args, LifeCycle lifeCycle) throws Exception {
super(args, lifeCycle);
}
开发者ID:mwsobol,项目名称:SORCER,代码行数:11,代码来源:ServiceTasker.java
示例14: SessionBeanProvider
import com.sun.jini.start.LifeCycle; //导入依赖的package包/类
/**
* Required constructor for Jini 2 NonActivatableServiceDescriptors
*
* @param args
* @param lifeCycle
* @throws Exception
*/
public SessionBeanProvider(String[] args, LifeCycle lifeCycle) throws Exception {
super(args, lifeCycle);
}
开发者ID:mwsobol,项目名称:SORCER,代码行数:11,代码来源:SessionBeanProvider.java
注:本文中的com.sun.jini.start.LifeCycle类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论