本文整理了Java中jadex.commons.future.Future.<init>()
方法的一些代码示例,展示了Future.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Future.<init>()
方法的具体详情如下:
包路径:jadex.commons.future.Future
类名称:Future
方法名:<init>
[英]Create a new future.
[中]创造一个新的未来。
代码示例来源:origin: org.activecomponents.jadex/jadex-commons
/**
* Get the empty future of some type.
* @return The empty future.
*/
public static <T> IFuture<T> getEmptyFuture()
{
return new Future<T>((T)null);
}
代码示例来源:origin: net.sourceforge.jadex/jadex-platform-base
/**
* Get the user name.
*/
public IFuture<String> getNickName()
{
return new Future<String>(nick);
}
代码示例来源:origin: net.sourceforge.jadex/jadex-platform-base
/**
* Check if password protection is enabled.
* @return True, if password protection is enabled.
*/
public IFuture<Boolean> isUsePassword()
{
return new Future<Boolean>(usepass);
}
代码示例来源:origin: net.sourceforge.jadex/jadex-platform-base
/**
* Get the trusted lan mode.
* @return True if is in trusted lan mode.
*/
public IFuture<Boolean> isTrustedLanMode()
{
return new Future<Boolean>(trustedlan? Boolean.TRUE: Boolean.FALSE);
}
代码示例来源:origin: net.sourceforge.jadex/jadex-platform-base
/**
* Test if context is executing.
*/
public IFuture<Boolean> isExecuting()
{
return new Future<Boolean>(executing ? Boolean.TRUE : Boolean.FALSE);
}
代码示例来源:origin: net.sourceforge.jadex/jadex-platform-base
/**
* Remove content codec type.
* @param codec The codec type.
*/
public IFuture<Void> removeContentCodec(IContentCodec codec)
{
if(contentcodecs!=null)
contentcodecs.remove(codec);
return new Future(null);
}
代码示例来源:origin: net.sourceforge.jadex/jadex-platform-base
/**
* Get the component identifiers of all (managed) platforms.
*
* @return Collection of platform ids.
*/
public IFuture<Set<IComponentIdentifier>> getPlatforms()
{
return new Future<Set<IComponentIdentifier>>(platforms.keySet());
}
代码示例来源:origin: net.sourceforge.jadex/jadex-bridge
/**
* Decides if the search should start ranking.
*/
public Future<Boolean> isStartRanking(Collection<S> currentresults, IServiceEvaluator evaluator)
{
return new Future<Boolean>(currentresults.size() >= threshold);
}
}
代码示例来源:origin: net.sourceforge.jadex/jadex-platform-base
public IFuture<Void> execute(Void args)
{
return new Future<Void>(new RuntimeException("Send failed"));
}
};
代码示例来源:origin: org.activecomponents.jadex/jadex-bridge
/**
* Returns the names of all non-functional properties of this service.
* @return The names of the non-functional properties of this service.
*/
public IFuture<String[]> getNFPropertyNames()
{
return new Future<String[]>(nfproperties != null? nfproperties.keySet().toArray(new String[nfproperties.size()]) : new String[0]);
}
代码示例来源:origin: net.sourceforge.jadex/jadex-bridge
/**
* Get the value.
*/
public IFuture<T> getValue(U unit)
{
T ret = value;
if(unit instanceof IConvertableUnit)
ret = ((IConvertableUnit<T>)unit).convert(ret);
return new Future<T>(ret);
}
代码示例来源:origin: net.sourceforge.jadex/jadex-platform-base
/**
* Add message codec type.
* @param codec The codec type.
*/
public IFuture<Void> addMessageCodec(Class codec)
{
codecfactory.addCodec(codec);
return new Future(null);
}
代码示例来源:origin: net.sourceforge.jadex/jadex-platform-base
/**
* Get the root identifier (platform).
* @return The root identifier.
*/
public IFuture<IComponentIdentifier> getRootIdentifier()
{
return new Future<IComponentIdentifier>(root.getComponentIdentifier());
}
代码示例来源:origin: net.sourceforge.jadex/jadex-platform-base
/**
* Get other contained (but not directly managed) urls from parent classloaders.
* @return The list of urls.
*/
public IFuture<List<URL>> getNonManagedURLs()
{
return new Future<List<URL>>(new ArrayList<URL>(getInternalNonManagedURLs()));
}
代码示例来源:origin: net.sourceforge.jadex/jadex-platform-base
/**
* Get the local password.
* @return The password of the local platform (if any).
*/
@SecureTransmission
// Todo: password is transferred in plain text unless transport uses encryption.
public IFuture<String> getLocalPassword()
{
return new Future<String>(password);
}
代码示例来源:origin: net.sourceforge.jadex/jadex-bridge
/**
* Test if service is a proxy.
*/
public IFuture<Boolean> filter(Object obj)
{
return new Future<Boolean>(obj instanceof IService && ((IService)obj).getServiceIdentifier().equals(sid));
}
代码示例来源:origin: net.sourceforge.jadex/jadex-platform-base
@Classname("getDiscoveryInfos")
public IFuture<DiscoveryInfo[]> execute(IInternalAccess ia)
{
AwarenessManagementAgent agent = (AwarenessManagementAgent) ia;
return new Future<DiscoveryInfo[]>(agent.getDiscoveryInfos());
}
});
代码示例来源:origin: net.sourceforge.jadex/jadex-platform-base
/**
* Create a send info.
*/
public DataSendInfo(StreamSendTask task)
{
this.task = task;
this.fut = new Future<Void>();
this.tries = 1;
timer = createBulkAckTimer(task.getSequenceNumber());
lastsend = OutputConnectionHandler.this.getSequenceNumber();
}
代码示例来源:origin: net.sourceforge.jadex/jadex-bridge
/**
* Execute the interceptor.
* @param context The invocation context.
*/
public IFuture<Void> execute(ServiceInvocationContext sic)
{
// INFMixedPropertyProvider res = component.getRequiredServicePropertyProvider((IServiceIdentifier)sic.getArgumentArray()[0]);
INFMixedPropertyProvider res = getComponent().getServiceContainer().getRequiredServicePropertyProvider(sid);
sic.setResult(new Future<INFMixedPropertyProvider>(res));
return IFuture.DONE;
}
}
代码示例来源:origin: org.activecomponents.jadex/jadex-platform
public void pullIntermediateResult()
{
Future<Object> res = new Future<Object>();
final String mycallid = SUtil.createUniqueId(compid.getLocalName()+"."+method.toString());
RemoteFuturePullCommand content = new RemoteFuturePullCommand(mycallid, callid);
// Can be invoked directly, because internally redirects to agent thread.
// System.out.println("sending terminate");
rsms.sendMessage(pr.getRemoteReference().getRemoteManagementServiceIdentifier(), null,
content, mycallid, to, res, nonfunc, sic);
}
内容来源于网络,如有侵权,请联系作者删除!