运行资源类以生成不同的输出类型。
Run the resource class to produce different types of output.
清单4展示了root资源类。
实现资源的POJO被称为资源类。
Any POJO that implements the resource is known as the resource class.
Order类是一个资源类。
清单23.在资源类中生成html。
每个资源类都潜在对应于描述中的URI。
Each resource classes potentially corresponds to a URI in the description.
向已有的Person资源类中添加通知。
Adding notifications to your existing Person resource class.
接下来,运行资源类,生成不同类型的输出。
Next, run the resource class producing different types of output.
清单25.在资源类中生成文本媒体类型。
从描述生成资源类。
手工创建资源类。
罗奇说,我不会持有资源类股,我会做空实物铜。
'I would not own resource companies, and I would short physical copper,' Roche said.
例如,在资源类中,取消清单23中的方法的注释。
For example, in the resource class, uncomment the method in Listing 23.
要添加这些属性中的另一个,您必须重新编译资源类。
To add another one of these properties you must recompile the resource class.
实现以上行之后,所有的资源将被自定义资源类处理。
Once the above line is present, all the resources are handled by your custom resources class.
允许的响应类型应当匹配资源类中生成的MIME类型。
The accepted response type should match the MIME type produced in the resource class.
要获得文本响应,对清单25中资源类中的方法取消注释。
To get the text response, uncomment the method in the resource class in Listing 25.
ResourceClass:将流程委托给该资源类。
Resource Class: Delegate the process to this resource class.
资源类进一步实现资源方法,资源方法实际处理底层业务逻辑。
Resource classes further implement the resource methods that actually handle the underlying business logic.
请求处理器使用请求uri寻找、匹配和调用相应的资源类和方法。
The request processor USES the request URI to find, match, and invoke the corresponding resource class and method.
接下来,使用根资源类创建一个RESTfulweb服务资源。
Next, create a RESTful web service resource using a root resource class.
正如您看到的,使用强类型资源类访问资源文件中的字符串比较简单。
As you can see, accessing strings from a resource file using a strongly typed resource class is pretty easy.
资源类生成的MIME类型应当匹配一种可接受的 MIME 类型。
The MIME type produced by the resource class should match an acceptable MIME type.
Resources \Users . hrf ?定义资源类层次结构。
Resources \ Users.hrf - Defines the resource class hierarchy.
右键单击资源类,并选择Run As > Run onServer。
Right-click the resource class, and select Run As > Run on Server.
下一步是使用一个root资源类创建一个RESTfulWeb服务资源。
The next step is to create a RESTful web service resource using a root resource class.
资源类决定哪些内容将作为REST 风格的Web服务向客户机应用程序公开。
Resource classes decide what will be exposed as RESTful Web services to the client applications.
它使用注释映射资源类与URI,并将HTTP请求中的标准HTTP方法映射到资源类中的方法。
It USES annotations to map the resource class with a URI and to map standard HTTP methods in an HTTP request to the methods in the resource class.
它使用注释映射资源类与URI,并将HTTP请求中的标准HTTP方法映射到资源类中的方法。
It USES annotations to map the resource class with a URI and to map standard HTTP methods in an HTTP request to the methods in the resource class.
应用推荐