Ejemplo n.º 1
0
  /* package */
  Message(
      LDAPMessage msg,
      int mslimit,
      Connection conn,
      MessageAgent agent,
      LDAPMessageQueue queue,
      BindProperties bindprops) {
    this.msg = msg;
    this.conn = conn;
    this.agent = agent;
    this.queue = queue;
    this.mslimit = mslimit;
    this.msgId = msg.getMessageID();
    this.bindprops = bindprops;

    if (Debug.LDAP_DEBUG) {
      name = "Message(" + this.msgId + "): ";
      Debug.trace(Debug.messages, name + " Created with mslimit " + this.mslimit);
    }
    return;
  }
Ejemplo n.º 2
0
 /* package */
 final void sendMessage() throws LDAPException {
   if (Debug.LDAP_DEBUG) {
     Debug.trace(Debug.messages, name + "Sending request to " + conn.getConnectionName());
   }
   conn.writeMessage(this);
   // Start the timer thread
   if (mslimit != 0) {
     // Don't start the timer thread for abandon or Unbind
     switch (msg.getType()) {
       case LDAPMessage.ABANDON_REQUEST:
       case LDAPMessage.UNBIND_REQUEST:
         mslimit = 0;
         break;
       default:
         // start the timer thread
         timer = new Timeout(mslimit, this);
         timer.setDaemon(true); // If this is the last thread running, allow exit.
         timer.start();
         break;
     }
   }
   return;
 }
Ejemplo n.º 3
0
 /* package */
 int getMessageType() {
   if (msg == null) {
     return -1;
   }
   return msg.getType();
 }