01: /**
02: * Sequoia: Database clustering technology.
03: * Copyright (C) 2005 EmicNetworks.
04: * Contact: sequoia@continuent.org
05: *
06: * Licensed under the Apache License, Version 2.0 (the "License");
07: * you may not use this file except in compliance with the License.
08: * You may obtain a copy of the License at
09: *
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: */package org.continuent.sequoia.controller.backup;
21:
22: import java.io.Serializable;
23: import java.net.SocketAddress;
24:
25: /**
26: * DumpTransferInfo is used to store the necessary information for the client
27: * backuper to fetch a dump from server backuper.
28: *
29: * @author <a href="mailto:olivier.fambon@emicnetworks.com">Olivier Fambon</a>
30: * @version 1.0
31: */
32: public class DumpTransferInfo implements Serializable {
33: private static final long serialVersionUID = -7714674074423697782L;
34:
35: private long sessionKey;
36: private SocketAddress backuperServerAddress;
37:
38: DumpTransferInfo(SocketAddress backuperServerAddress,
39: long sessionKey) {
40: this .sessionKey = sessionKey;
41: this .backuperServerAddress = backuperServerAddress;
42: }
43:
44: /**
45: * Returns the Backuper server address that clients should use to fetch a
46: * dump. The Backuper server at this address will ask for the session key.
47: *
48: * @return the Backuper server address.
49: */
50: public SocketAddress getBackuperServerAddress() {
51: return backuperServerAddress;
52: }
53:
54: /**
55: * Returns a SessionKey to be used as authentication token by the client when
56: * fetching a dump.
57: *
58: * @return a SessionKey to be used as authentication token.
59: */
60: public long getSessionKey() {
61: return sessionKey;
62: }
63: }
|