org.apache.directory.ldap.client.api.message
Class AbstractRequest

java.lang.Object
  extended by org.apache.directory.ldap.client.api.message.AbstractMessage
      extended by org.apache.directory.ldap.client.api.message.AbstractRequest
All Implemented Interfaces:
Message, Request
Direct Known Subclasses:
AbandonRequest, AddRequest, BindRequest, CompareRequest, DeleteRequest, ExtendedRequest, ModifyDnRequest, ModifyRequest, SearchRequest, UnbindRequest

public class AbstractRequest
extends AbstractMessage
implements Request

An abstract class containing the Controls and timeout for all the requests.

Version:
$Rev$, $Date$
Author:
Apache Directory Project

Constructor Summary
protected AbstractRequest()
          Creates a new instance of AbstractRequest.
 
Method Summary
 long getTimeout()
          Get the client message timeout.
 Message setTimeout(long timeout)
          Set a request client timeout.
 
Methods inherited from class org.apache.directory.ldap.client.api.message.AbstractMessage
add, getControl, getControls, getMessageId, hasControl, remove, setMessageId, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.directory.ldap.client.api.message.Message
add, getControl, getControls, getMessageId, hasControl, remove, setMessageId
 

Constructor Detail

AbstractRequest

protected AbstractRequest()
Creates a new instance of AbstractRequest.

Method Detail

getTimeout

public long getTimeout()
Get the client message timeout. When the timeout is reached, the request is canceled.

Specified by:
getTimeout in interface Request
Returns:
The timeout

setTimeout

public Message setTimeout(long timeout)
Set a request client timeout. When this timeout is reached, the request will be canceled. If <= 0, then we wait for the response forever.

Specified by:
setTimeout in interface Request
Parameters:
timeout - The new timeout, expressed in milliseconds


Copyright © 2009-2011 Apache Software Foundation. All Rights Reserved.