| | |
| | | */ |
| | | public LDAPMessage(int messageID, ProtocolOp protocolOp) |
| | | { |
| | | |
| | | this.messageID = messageID; |
| | | this.protocolOp = protocolOp; |
| | | |
| | |
| | | public LDAPMessage(int messageID, ProtocolOp protocolOp, |
| | | ArrayList<LDAPControl> controls) |
| | | { |
| | | |
| | | this.messageID = messageID; |
| | | this.protocolOp = protocolOp; |
| | | |
| | |
| | | */ |
| | | public int getMessageID() |
| | | { |
| | | |
| | | return messageID; |
| | | } |
| | | |
| | |
| | | */ |
| | | public void setMessageID(int messageID) |
| | | { |
| | | |
| | | this.messageID = messageID; |
| | | } |
| | | |
| | |
| | | */ |
| | | public ProtocolOp getProtocolOp() |
| | | { |
| | | |
| | | return protocolOp; |
| | | } |
| | | |
| | |
| | | */ |
| | | public byte getProtocolOpType() |
| | | { |
| | | |
| | | return protocolOp.getType(); |
| | | } |
| | | |
| | |
| | | */ |
| | | public String getProtocolOpName() |
| | | { |
| | | |
| | | return protocolOp.getProtocolOpName(); |
| | | } |
| | | |
| | |
| | | public AbandonRequestProtocolOp getAbandonRequestProtocolOp() |
| | | throws ClassCastException |
| | | { |
| | | |
| | | return (AbandonRequestProtocolOp) protocolOp; |
| | | } |
| | | |
| | |
| | | public AddRequestProtocolOp getAddRequestProtocolOp() |
| | | throws ClassCastException |
| | | { |
| | | |
| | | return (AddRequestProtocolOp) protocolOp; |
| | | } |
| | | |
| | |
| | | public AddResponseProtocolOp getAddResponseProtocolOp() |
| | | throws ClassCastException |
| | | { |
| | | |
| | | return (AddResponseProtocolOp) protocolOp; |
| | | } |
| | | |
| | |
| | | public BindRequestProtocolOp getBindRequestProtocolOp() |
| | | throws ClassCastException |
| | | { |
| | | |
| | | return (BindRequestProtocolOp) protocolOp; |
| | | } |
| | | |
| | |
| | | public BindResponseProtocolOp getBindResponseProtocolOp() |
| | | throws ClassCastException |
| | | { |
| | | |
| | | return (BindResponseProtocolOp) protocolOp; |
| | | } |
| | | |
| | |
| | | public CompareRequestProtocolOp getCompareRequestProtocolOp() |
| | | throws ClassCastException |
| | | { |
| | | |
| | | return (CompareRequestProtocolOp) protocolOp; |
| | | } |
| | | |
| | |
| | | public CompareResponseProtocolOp getCompareResponseProtocolOp() |
| | | throws ClassCastException |
| | | { |
| | | |
| | | return (CompareResponseProtocolOp) protocolOp; |
| | | } |
| | | |
| | |
| | | public DeleteRequestProtocolOp getDeleteRequestProtocolOp() |
| | | throws ClassCastException |
| | | { |
| | | |
| | | return (DeleteRequestProtocolOp) protocolOp; |
| | | } |
| | | |
| | |
| | | public DeleteResponseProtocolOp getDeleteResponseProtocolOp() |
| | | throws ClassCastException |
| | | { |
| | | |
| | | return (DeleteResponseProtocolOp) protocolOp; |
| | | } |
| | | |
| | |
| | | public ExtendedRequestProtocolOp getExtendedRequestProtocolOp() |
| | | throws ClassCastException |
| | | { |
| | | |
| | | return (ExtendedRequestProtocolOp) protocolOp; |
| | | } |
| | | |
| | |
| | | public ExtendedResponseProtocolOp getExtendedResponseProtocolOp() |
| | | throws ClassCastException |
| | | { |
| | | |
| | | return (ExtendedResponseProtocolOp) protocolOp; |
| | | } |
| | | |
| | |
| | | public ModifyRequestProtocolOp getModifyRequestProtocolOp() |
| | | throws ClassCastException |
| | | { |
| | | |
| | | return (ModifyRequestProtocolOp) protocolOp; |
| | | } |
| | | |
| | |
| | | public ModifyResponseProtocolOp getModifyResponseProtocolOp() |
| | | throws ClassCastException |
| | | { |
| | | |
| | | return (ModifyResponseProtocolOp) protocolOp; |
| | | } |
| | | |
| | |
| | | public ModifyDNRequestProtocolOp getModifyDNRequestProtocolOp() |
| | | throws ClassCastException |
| | | { |
| | | |
| | | return (ModifyDNRequestProtocolOp) protocolOp; |
| | | } |
| | | |
| | |
| | | public ModifyDNResponseProtocolOp getModifyDNResponseProtocolOp() |
| | | throws ClassCastException |
| | | { |
| | | |
| | | return (ModifyDNResponseProtocolOp) protocolOp; |
| | | } |
| | | |
| | |
| | | public SearchRequestProtocolOp getSearchRequestProtocolOp() |
| | | throws ClassCastException |
| | | { |
| | | |
| | | return (SearchRequestProtocolOp) protocolOp; |
| | | } |
| | | |
| | |
| | | public SearchResultDoneProtocolOp getSearchResultDoneProtocolOp() |
| | | throws ClassCastException |
| | | { |
| | | |
| | | return (SearchResultDoneProtocolOp) protocolOp; |
| | | } |
| | | |
| | |
| | | public SearchResultEntryProtocolOp getSearchResultEntryProtocolOp() |
| | | throws ClassCastException |
| | | { |
| | | |
| | | return (SearchResultEntryProtocolOp) protocolOp; |
| | | } |
| | | |
| | |
| | | public SearchResultReferenceProtocolOp getSearchResultReferenceProtocolOp() |
| | | throws ClassCastException |
| | | { |
| | | |
| | | return (SearchResultReferenceProtocolOp) protocolOp; |
| | | } |
| | | |
| | |
| | | public UnbindRequestProtocolOp getUnbindRequestProtocolOp() |
| | | throws ClassCastException |
| | | { |
| | | |
| | | return (UnbindRequestProtocolOp) protocolOp; |
| | | } |
| | | |
| | |
| | | */ |
| | | public void setProtocolOp(ProtocolOp protocolOp) |
| | | { |
| | | |
| | | this.protocolOp = protocolOp; |
| | | } |
| | | |
| | |
| | | */ |
| | | public ArrayList<LDAPControl> getControls() |
| | | { |
| | | |
| | | return controls; |
| | | } |
| | | |
| | |
| | | */ |
| | | public ASN1Element encode() |
| | | { |
| | | |
| | | ArrayList<ASN1Element> messageElements = new ArrayList<ASN1Element>(3); |
| | | messageElements.add(new ASN1Integer(messageID)); |
| | | messageElements.add(protocolOp.encode()); |
| | |
| | | public static LDAPMessage decode(ASN1Sequence messageSequence) |
| | | throws LDAPException |
| | | { |
| | | |
| | | if (messageSequence == null) |
| | | { |
| | | int msgID = MSGID_LDAP_MESSAGE_DECODE_NULL; |
| | |
| | | */ |
| | | public String getProtocolElementName() |
| | | { |
| | | |
| | | return "LDAP"; |
| | | } |
| | | |
| | |
| | | */ |
| | | public String toString() |
| | | { |
| | | |
| | | StringBuilder buffer = new StringBuilder(); |
| | | toString(buffer); |
| | | return buffer.toString(); |
| | |
| | | */ |
| | | public void toString(StringBuilder buffer) |
| | | { |
| | | |
| | | buffer.append("LDAPMessage(msgID="); |
| | | buffer.append(messageID); |
| | | buffer.append(", protocolOp="); |
| | |
| | | */ |
| | | public void toString(StringBuilder buffer, int indent) |
| | | { |
| | | |
| | | StringBuilder indentBuf = new StringBuilder(indent); |
| | | for (int i=0 ; i < indent; i++) |
| | | { |