public interface WebServiceContext
WebServiceContext使得Web服务端点实现类来访问消息上下文相关的信息服务和安全要求。一个典型的
WebServiceContext注入一个端点实现类使用
Resource注释。
Resource
| Modifier and Type | Method and Description |
|---|---|
<T extends EndpointReference> |
getEndpointReference(类<T> clazz, Element... referenceParameters)
返回与此相关的
EndpointReference端点。
|
EndpointReference |
getEndpointReference(Element... referenceParameters)
返回此端点的
EndpointReference。
|
MessageContext |
getMessageContext()
返回请求服务时,这种方法被称为
MessageContext。
|
Principal |
getUserPrincipal()
返回当前正在服务的请求的发送者的主体。
|
boolean |
isUserInRole(String role)
返回一个布尔值,指示是否包含已验证的用户是否包含在指定的逻辑角色中。
|
MessageContext getMessageContext()
MessageContext。只有应用程序范围的属性将在应用程序中可见。
IllegalStateException这个例外是如果方法没有要求为服务称扔。
MessageContext,
MessageContext.Scope,
IllegalStateException
Principal getUserPrincipal()
null。
IllegalStateException这个例外是如果方法没有要求为服务称扔。
Principal,
IllegalStateException
boolean isUserInRole(String role)
false。
role -
String指定角色的名字
boolean指示请求的发送者属于给定的角色
IllegalStateException这个例外是如果方法没有要求为服务称扔。
EndpointReference getEndpointReference(Element... referenceParameters)
EndpointReference。
如果这bindingProvider的Binding是soap1.1/http或soap1.2/http,然后W3CEndpointReference必须返回。
referenceParameters参考参数和返回
EndpointReference实例关联。
WebServiceContext。如果返回类型是
EndpointReference
W3CEndpointReference那么它必须包含指定的
referenceParameters。
IllegalStateException这个例外是如果方法没有要求为服务称扔。
W3CEndpointReference
<T extends EndpointReference> T getEndpointReference(类<T> clazz, Element... referenceParameters)
EndpointReference端点。
clazz -
EndpointReference类型必须返回。
referenceParameters参考参数和返回
EndpointReference实例关联。
WebServiceContext实例关联的端点类型
clazz EndpointReference。如果返回类型是
EndpointReference
W3CEndpointReference那么它必须包含指定的
referenceParameters。
IllegalStateException这个例外是如果方法没有要求为服务称扔。
WebServiceException -如果
EndpointReference的
clazz类型不支持。
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.