1 24 30 31 package org.datashare.objects; 32 33 import java.net.InetAddress ; 34 import java.net.Socket ; 35 36 44 public class DataShareConnectionDescriptor implements java.io.Serializable  45 { 46 50 static final long serialVersionUID = 9030593813711490503L; 51 52 public InetAddress serverIP; 53 public int serverPort; 54 public InetAddress clientIP; 55 public int clientPort; 56 public String name; 57 public int type; public String clientKeyValue; public String keyValue; public ChannelDescription channelDescription; 61 public String sessionName; 62 public String tokenKey = ""; public String databaseID; 65 public boolean constantPing = false; 66 public boolean completelySpecified = false; 67 68 71 public DataShareConnectionDescriptor( 72 String sessionName, 73 ChannelDescription channelDescription, 74 String clientKeyValue, 75 InetAddress serverIP, 76 int serverPort, 77 InetAddress clientIP, 78 int clientPort) 79 { 80 this.sessionName = sessionName; 81 this.channelDescription = channelDescription; 82 name = channelDescription.channelName; 83 this.clientKeyValue = clientKeyValue; 84 this.type = channelDescription.type; 85 this.serverIP = serverIP; 86 this.serverPort = serverPort; 87 this.clientIP = clientIP; 88 this.clientPort = clientPort; 89 keyValue = name + "-" + new Integer (type) + "-" + serverIP.getHostAddress() + ":" + serverPort 90 + clientIP.getHostAddress() + ":" + clientPort; 91 tokenKey = sessionName+"."+channelDescription.channelName; 92 completelySpecified = true; 93 } 94 95 98 public DataShareConnectionDescriptor( 99 String sessionName, 100 ChannelDescription channelDescription, 101 InetAddress serverIP, 102 int serverPort) 103 { 104 this.sessionName = sessionName; 105 this.channelDescription = channelDescription; 106 name = channelDescription.channelName; 107 this.type = channelDescription.type; 108 this.serverIP = serverIP; 109 this.serverPort = serverPort; 110 keyValue = name + "-" + new Integer (type) + "-" + serverIP.getHostAddress() + ":" + serverPort; 111 tokenKey = sessionName+"."+channelDescription.channelName; 112 completelySpecified = false; 113 } 114 115 121 122 } 123 124
| Popular Tags
|