1 /**
2 * Copyright 2005-2006 the original author or authors.
3 *
4 * Licensed under the Gnu General Pubic License, Version 2.0 (the
5 * "License"); you may not use this file except in compliance with
6 * the License. You may obtain a copy of the License at
7 *
8 * http://www.opensource.org/licenses/gpl-license.php
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 * See the Gnu General Public License for more details.
14 */
15 package org.figure8.join.services.remoting.beans;
16
17 import java.io.Serializable;
18 /**
19 * This is a thin bean aimed to be used by clients wanted to remotely bind
20 * <code>Component</code>s. This object is not for providing remote view
21 * (some information of Component are missing)
22 * @author <a href="mailto:laurent.broudoux@free.fr">Laurent Broudoux</a>
23 * @version $Revision: 1.1 $
24 */
25 public class RemoteComponent implements Serializable{
26
27
28
29 /** The component size (in bytes) */
30 private long size;
31 /** Component version information */
32 private String versionInfo;
33 /** The key of corresponding component type */
34 private String componentTypeKey;
35
36
37
38
39 /**
40 * Create a new instance of RemoteComponent
41 * @param versionInfo Component version information
42 * @param size The component size (in bytes)
43 * @param typeKey The key of corresponding component type
44 */
45 public RemoteComponent(String versionInfo, long size, String typeKey){
46 this.versionInfo = versionInfo;
47 this.size = size;
48 this.componentTypeKey = typeKey;
49 }
50
51
52
53
54 /** @return The component size (in bytes) */
55 public long getSize(){
56 return size;
57 }
58 /** @param size The component size (in bytes) */
59 public void setSize(long size){
60 this.size = size;
61 }
62
63 /** @return Component version information */
64 public String getVersionInfo(){
65 return versionInfo;
66 }
67 /** @param versionInfo Component version information */
68 public void setVersionInfo(String versionInfo){
69 this.versionInfo = versionInfo;
70 }
71
72 /** @return The key of corresponding component type */
73 public String getComponentTypeKey(){
74 return componentTypeKey;
75 }
76 /** @param componentTypeKey The key of corresponding component type */
77 public void setComponentTypeKey(String componentTypeKey){
78 this.componentTypeKey = componentTypeKey;
79 }
80 }