01: /*
02: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
03: */
04: package com.tc.net.protocol.transport;
05:
06: public class TransportHandshakeErrorContext {
07: private String message;
08: private Throwable throwable;
09:
10: public TransportHandshakeErrorContext(String message) {
11: this .message = message;
12: }
13:
14: public TransportHandshakeErrorContext(String message,
15: Throwable throwable) {
16: this (message);
17: this .throwable = throwable;
18: }
19:
20: public String getMessage() {
21: return message;
22: }
23:
24: public String toString() {
25: StringBuffer rv = new StringBuffer(getClass().getName() + ": "
26: + this .message);
27: if (this .throwable != null) {
28: rv.append(", throwable=" + throwable.getMessage());
29: }
30: return rv.toString();
31: }
32: }
|