KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > cjdbc > controller > backup > DumpTransferInfo


1 /**
2  * C-JDBC: Clustered JDBC.
3  * Copyright (C) 2005 EmicNetworks.
4  * Contact: c-jdbc@objectweb.org
5  *
6  * This library is free software; you can redistribute it and/or modify it
7  * under the terms of the GNU Lesser General Public License as published by the
8  * Free Software Foundation; either version 2.1 of the License, or any later
9  * version.
10  *
11  * This library is distributed in the hope that it will be useful, but WITHOUT
12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
14  * for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public License
17  * along with this library; if not, write to the Free Software Foundation,
18  * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
19  *
20  * Initial developer(s): Olivier Fambon.
21  * Contributor(s): ______________________.
22  */

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

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

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

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