| | |
| | | * Portions Copyright 2006-2007 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.protocols.ldap; |
| | | import org.opends.messages.Message; |
| | | |
| | | |
| | | |
| | |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | | import static org.opends.server.messages.ProtocolMessages.*; |
| | | import static org.opends.messages.ProtocolMessages.*; |
| | | import static org.opends.server.protocols.ldap.LDAPConstants.*; |
| | | import static org.opends.server.protocols.ldap.LDAPResultCode.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_LDAP_INTERMEDIATE_RESPONSE_DECODE_SEQUENCE; |
| | | String message = getMessage(msgID, String.valueOf(e)); |
| | | throw new LDAPException(PROTOCOL_ERROR, msgID, message, e); |
| | | Message message = |
| | | ERR_LDAP_INTERMEDIATE_RESPONSE_DECODE_SEQUENCE.get(String.valueOf(e)); |
| | | throw new LDAPException(PROTOCOL_ERROR, message, e); |
| | | } |
| | | |
| | | |
| | | int numElements = elements.size(); |
| | | if (numElements > 2) |
| | | { |
| | | int msgID = MSGID_LDAP_INTERMEDIATE_RESPONSE_DECODE_INVALID_ELEMENT_COUNT; |
| | | String message = getMessage(msgID, numElements); |
| | | throw new LDAPException(PROTOCOL_ERROR, msgID, message); |
| | | Message message = |
| | | ERR_LDAP_INTERMEDIATE_RESPONSE_DECODE_INVALID_ELEMENT_COUNT. |
| | | get(numElements); |
| | | throw new LDAPException(PROTOCOL_ERROR, message); |
| | | } |
| | | |
| | | |
| | |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ae); |
| | | } |
| | | |
| | | int msgID = MSGID_LDAP_INTERMEDIATE_RESPONSE_CANNOT_DECODE_OID; |
| | | String message = getMessage(msgID, ae.getMessage()); |
| | | throw new LDAPException(PROTOCOL_ERROR, msgID, message); |
| | | Message message = ERR_LDAP_INTERMEDIATE_RESPONSE_CANNOT_DECODE_OID. |
| | | get(ae.getMessage()); |
| | | throw new LDAPException(PROTOCOL_ERROR, message); |
| | | } |
| | | break; |
| | | case TYPE_INTERMEDIATE_RESPONSE_VALUE: |
| | |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ae); |
| | | } |
| | | |
| | | int msgID = MSGID_LDAP_INTERMEDIATE_RESPONSE_CANNOT_DECODE_VALUE; |
| | | String message = getMessage(msgID, ae.getMessage()); |
| | | throw new LDAPException(PROTOCOL_ERROR, msgID, message); |
| | | Message message = |
| | | ERR_LDAP_INTERMEDIATE_RESPONSE_CANNOT_DECODE_VALUE. |
| | | get(ae.getMessage()); |
| | | throw new LDAPException(PROTOCOL_ERROR, message); |
| | | } |
| | | break; |
| | | default: |
| | | int msgID = MSGID_LDAP_INTERMEDIATE_RESPONSE_INVALID_ELEMENT_TYPE; |
| | | String message = getMessage(msgID, byteToHex(e.getType())); |
| | | throw new LDAPException(PROTOCOL_ERROR, msgID, message); |
| | | Message message = ERR_LDAP_INTERMEDIATE_RESPONSE_INVALID_ELEMENT_TYPE. |
| | | get(byteToHex(e.getType())); |
| | | throw new LDAPException(PROTOCOL_ERROR, message); |
| | | } |
| | | } |
| | | else if (elements.size() == 2) |
| | |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ae); |
| | | } |
| | | |
| | | int msgID = MSGID_LDAP_INTERMEDIATE_RESPONSE_CANNOT_DECODE_OID; |
| | | String message = getMessage(msgID, ae.getMessage()); |
| | | throw new LDAPException(PROTOCOL_ERROR, msgID, message); |
| | | Message message = ERR_LDAP_INTERMEDIATE_RESPONSE_CANNOT_DECODE_OID.get( |
| | | ae.getMessage()); |
| | | throw new LDAPException(PROTOCOL_ERROR, message); |
| | | } |
| | | |
| | | try |
| | |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ae); |
| | | } |
| | | |
| | | int msgID = MSGID_LDAP_INTERMEDIATE_RESPONSE_CANNOT_DECODE_OID; |
| | | String message = getMessage(msgID, ae.getMessage()); |
| | | throw new LDAPException(PROTOCOL_ERROR, msgID, message); |
| | | Message message = ERR_LDAP_INTERMEDIATE_RESPONSE_CANNOT_DECODE_OID.get( |
| | | ae.getMessage()); |
| | | throw new LDAPException(PROTOCOL_ERROR, message); |
| | | } |
| | | } |
| | | |