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.gracefulDisconnect; 021 022 023import org.apache.directory.api.ldap.model.message.ExtendedResponse; 024import org.apache.directory.api.ldap.model.message.Referral; 025 026 027/** 028 * An unsolicited notification, extended response, intended for notifying 029 * clients of upcoming disconnection due to intended service windows. Unlike the 030 * {@link org.apache.directory.api.ldap.model.message.extended.NoticeOfDisconnect} this response contains additional information about 031 * the amount of time the server will be offline and exactly when it intends to 032 * shutdown. 033 * 034 * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a> 035 */ 036public interface GracefulDisconnectResponse extends ExtendedResponse 037{ 038 /** The OID for the graceful disconnect extended operation response. */ 039 String EXTENSION_OID = "1.3.6.1.4.1.18060.0.1.5"; 040 041 042 /** 043 * Gets the delay before disconnection, in seconds. 044 * 045 * @return the delay before disconnection 046 */ 047 int getDelay(); 048 049 050 /** 051 * Sets the delay before disconnection, in seconds. 052 * 053 * @param delay the new delay before disconnection 054 */ 055 void setDelay( int delay ); 056 057 058 /** 059 * Gets the offline time after disconnection, in minutes. 060 * 061 * @return the offline time after disconnection 062 */ 063 int getTimeOffline(); 064 065 066 /** 067 * Sets the time offline after disconnection, in minutes. 068 * 069 * @param timeOffline the new time offline after disconnection 070 */ 071 void setTimeOffline( int timeOffline ); 072 073 074 /** 075 * Gets the replicated contexts. 076 * 077 * @return the replicated contexts 078 */ 079 Referral getReplicatedContexts(); 080 081 082 /** 083 * Add a new URL of a replicated server 084 * 085 * @param replicatedContext The replicated server to add. 086 */ 087 void addReplicatedContexts( String replicatedContext ); 088}