View Javadoc

1   /*
2    * Copyright 2001-2004 The Apache Software Foundation.
3    * 
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    * 
8    *      http://www.apache.org/licenses/LICENSE-2.0
9    * 
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.jdiagnose.remote;
17  
18  import org.jdiagnose.RemoteResult;
19  import org.jdiagnose.ResultInfo;
20  
21  /***
22   * @author jmccrindle
23   */
24  public class RemoteResultWrapper implements RemoteResult {
25  
26      protected RemoteResult remoteResult;
27      
28      public RemoteResultWrapper(RemoteResult remoteResult) {
29          this.remoteResult = remoteResult;
30      }
31      
32      /* (non-Javadoc)
33       * @see java.lang.Object#equals(java.lang.Object)
34       */
35      public boolean equals(Object obj) {
36          return remoteResult.equals(obj);
37      }
38      /***
39       * @return
40       */
41      public String getAgent() {
42          return remoteResult.getAgent();
43      }
44      /***
45       * @return
46       */
47      public String getGuid() {
48          return remoteResult.getGuid();
49      }
50      /***
51       * @return
52       */
53      public String getHost() {
54          return remoteResult.getHost();
55      }
56      /***
57       * @return
58       */
59      public ResultInfo getResultInfo() {
60          return remoteResult.getResultInfo();
61      }
62      /***
63       * @return
64       */
65      public long getSequenceNumber() {
66          return remoteResult.getSequenceNumber();
67      }
68      /* (non-Javadoc)
69       * @see java.lang.Object#hashCode()
70       */
71      public int hashCode() {
72          return remoteResult.hashCode();
73      }
74      /* (non-Javadoc)
75       * @see java.lang.Object#toString()
76       */
77      public String toString() {
78          return remoteResult.toString();
79      }
80  }