public interface ExtendedResponse extends Serializable
ExtendedResponse::= [ 24 ]应用序列{ldapresult成分,responsename [ 10 ] ldapoid可选,反应[ 11 ]字符串可选}它包括一个可选的对象标识符和可选的ASN.1 BER编码的值1。
在这个类中的方法可以使用的应用程序获得的扩展操作响应的低级别的信息。然而,通常情况下,应用程序将使用实现此接口的类的特定方法。这样的一个类应该在响应中解码了缓冲区的误码率,并应提供允许用户在一个类型安全和友好的方式访问该数据的方法。
例如,假设LDAP服务器支持的“时间”的扩展操作。它将提供gettimerequest和gettimeresponse类。的gettimeresponse类可能看起来像:
程序将使用这些类如下:public class GetTimeResponse implements ExtendedResponse { public java.util.Date getDate() {...}; public long getTime() {...}; .... }
GetTimeResponse resp = (GetTimeResponse) ectx.extendedOperation(new GetTimeRequest()); java.util.Date now = resp.getDate();
ExtendedRequest
Modifier and Type | Method and Description |
---|---|
byte[] |
getEncodedValue()
1检索ASN.1 BER编码的的LDAP扩展操作响应值。
|
String |
getID()
检索响应的对象标识符。
|
String getID()
byte[] getEncodedValue()
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.