1 16 package org.apache.catalina.cluster.session; 17 18 import org.apache.catalina.cluster.ClusterMessage; 19 20 26 public class SessionIDMessage implements ClusterMessage { 27 28 private org.apache.catalina.cluster.Member address; 29 30 private int messageNumber; 31 32 private long timestamp; 33 34 private String orignalSessionID; 35 36 private String backupSessionID; 37 38 private String contextPath; 39 40 public org.apache.catalina.cluster.Member getAddress() { 41 return address; 42 } 43 44 public void setAddress(org.apache.catalina.cluster.Member address) { 45 this.address = address; 46 } 47 48 public String getUniqueId() { 49 StringBuffer result = new StringBuffer (getOrignalSessionID()); 50 result.append("#-#"); 51 result.append(getBackupSessionID()); 52 result.append("#-#"); 53 result.append(getMessageNumber()); 54 result.append("#-#"); 55 result.append(System.currentTimeMillis()); 56 return result.toString(); 57 } 58 59 62 public String getContextPath() { 63 return contextPath; 64 } 65 68 public void setContextPath(String contextPath) { 69 this.contextPath = contextPath; 70 } 71 74 public int getMessageNumber() { 75 return messageNumber; 76 } 77 78 82 public void setMessageNumber(int messageNumber) { 83 this.messageNumber = messageNumber; 84 } 85 86 89 public long getTimestamp() { 90 return timestamp; 91 } 92 93 97 public void setTimestamp(long timestamp) { 98 this.timestamp = timestamp; 99 } 100 101 104 public String getBackupSessionID() { 105 return backupSessionID; 106 } 107 108 112 public void setBackupSessionID(String backupSessionID) { 113 this.backupSessionID = backupSessionID; 114 } 115 116 119 public String getOrignalSessionID() { 120 return orignalSessionID; 121 } 122 123 127 public void setOrignalSessionID(String orignalSessionID) { 128 this.orignalSessionID = orignalSessionID; 129 } 130 } 131 132 | Popular Tags |