001/* 002 * Licensed to the Apache Software Foundation (ASF) under one 003 * or more contributor license agreements. See the NOTICE file 004 * distributed with this work for additional information 005 * regarding copyright ownership. The ASF licenses this file 006 * to you under the Apache License, Version 2.0 (the 007 * "License"); you may not use this file except in compliance 008 * with the License. You may obtain a copy of the License at 009 * 010 * http://www.apache.org/licenses/LICENSE-2.0 011 * 012 * Unless required by applicable law or agreed to in writing, 013 * software distributed under the License is distributed on an 014 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 015 * KIND, either express or implied. See the License for the 016 * specific language governing permissions and limitations 017 * under the License. 018 * 019 */ 020package org.apache.directory.api.ldap.extras.extended.gracefulShutdown; 021 022 023import org.apache.directory.api.ldap.model.message.ExtendedRequest; 024 025 026/** 027 * An extended operation requesting the server to shutdown it's LDAP service 028 * port while allowing established clients to complete or abandon operations 029 * already in progress. More information about this extended request is 030 * available here: <a href="http://docs.safehaus.org:8080/x/GR">LDAP Extensions 031 * for Graceful Shutdown</a>. 032 * 033 * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a> 034 */ 035public interface GracefulShutdownRequest extends ExtendedRequest 036{ 037 /** The OID for the graceful shutdown extended operation request. */ 038 String EXTENSION_OID = "1.3.6.1.4.1.18060.0.1.3"; 039 040 /** Undetermined value used for offline time */ 041 int UNDETERMINED = 0; 042 043 /** The shutdown is immediate */ 044 int NOW = 0; 045 046 047 /** 048 * Gets the delay before disconnection, in seconds. 049 * 050 * @return the delay before disconnection 051 */ 052 int getDelay(); 053 054 055 /** 056 * Sets the delay before disconnection, in seconds. 057 * 058 * @param delay the new delay before disconnection 059 */ 060 void setDelay( int delay ); 061 062 063 /** 064 * Gets the offline time after disconnection, in minutes. 065 * 066 * @return the offline time after disconnection 067 */ 068 int getTimeOffline(); 069 070 071 /** 072 * Sets the time offline after disconnection, in minutes. 073 * 074 * @param timeOffline the new time offline after disconnection 075 */ 076 void setTimeOffline( int timeOffline ); 077 078}