本文整理了Java中org.restlet.Restlet.getApplication
方法的一些代码示例,展示了Restlet.getApplication
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Restlet.getApplication
方法的具体详情如下:
包路径:org.restlet.Restlet
类名称:Restlet
方法名:getApplication
[英]Returns the parent application if it exists, or null.
[中]返回父应用程序(如果存在)或null。
代码示例来源:origin: org.restlet.osgi/org.restlet
@Override
public org.restlet.Application getApplication() {
return wrappedRestlet.getApplication();
}
代码示例来源:origin: org.restlet/org.restlet
@Override
public Application getApplication() {
return wrappedRestlet.getApplication();
}
代码示例来源:origin: org.restlet.osgi/org.restlet
/**
* Creates a new finder instance based on the "targetClass" property. If
* none is define, the {@link Application#createFinder(Class)} method is
* invoked if available, otherwise the
* {@link org.restlet.resource.Finder#createFinder(Class, Class, Context, Logger)}
* method is called with the {@link org.restlet.resource.Finder} class as
* parameter.
*
* @param resourceClass
* The target {@link org.restlet.resource.ServerResource} class
* to find.
* @return The new finder instance.
* @see org.restlet.resource.Finder#createFinder(Class, Class, Context,
* Logger)
*/
public org.restlet.resource.Finder createFinder(
Class<? extends org.restlet.resource.ServerResource> resourceClass) {
org.restlet.resource.Finder result = null;
if (getFinderClass() != null) {
result = org.restlet.resource.Finder.createFinder(resourceClass,
getFinderClass(), getContext(), getLogger());
} else if ((getApplication() != null) && (getApplication() != this)) {
result = getApplication().createFinder(resourceClass);
} else {
result = org.restlet.resource.Finder.createFinder(resourceClass,
org.restlet.resource.Finder.class, getContext(),
getLogger());
}
return result;
}
代码示例来源:origin: org.restlet.osgi/org.restlet
/**
* Returns the metadata service. If the parent application doesn't exist, a
* new instance is created.
*
* @return The metadata service.
*/
public MetadataService getMetadataService() {
MetadataService result = null;
if (getHelped() != null) {
org.restlet.Application application = getHelped().getApplication();
if (application != null) {
result = application.getMetadataService();
}
}
if (result == null) {
result = new MetadataService();
}
return result;
}
内容来源于网络,如有侵权,请联系作者删除!