KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > continuent > sequoia > controller > backup > DumpTransferInfo


1 /**
2  * Sequoia: Database clustering technology.
3  * Copyright (C) 2005 EmicNetworks.
4  * Contact: sequoia@continuent.org
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  *
18  * Initial developer(s): Olivier Fambon.
19  * Contributor(s): ______________________.
20  */

21
22 package org.continuent.sequoia.controller.backup;
23
24 import java.io.Serializable JavaDoc;
25 import java.net.SocketAddress JavaDoc;
26
27 /**
28  * DumpTransferInfo is used to store the necessary information for the client
29  * backuper to fetch a dump from server backuper.
30  *
31  * @author <a HREF="mailto:olivier.fambon@emicnetworks.com">Olivier Fambon</a>
32  * @version 1.0
33  */

34 public class DumpTransferInfo implements Serializable JavaDoc
35 {
36   private static final long serialVersionUID = -7714674074423697782L;
37
38   private long sessionKey;
39   private SocketAddress JavaDoc backuperServerAddress;
40
41   DumpTransferInfo(SocketAddress JavaDoc backuperServerAddress, long sessionKey)
42   {
43     this.sessionKey = sessionKey;
44     this.backuperServerAddress = backuperServerAddress;
45   }
46
47   /**
48    * Returns the Backuper server address that clients should use to fetch a
49    * dump. The Backuper server at this address will ask for the session key.
50    *
51    * @return the Backuper server address.
52    */

53   public SocketAddress JavaDoc getBackuperServerAddress()
54   {
55     return backuperServerAddress;
56   }
57
58   /**
59    * Returns a SessionKey to be used as authentication token by the client when
60    * fetching a dump.
61    *
62    * @return a SessionKey to be used as authentication token.
63    */

64   public long getSessionKey()
65   {
66     return sessionKey;
67   }
68 }
69
Popular Tags