com.kenmccrary.jtella
Class ConnectionData

java.lang.Object
  |
  +--com.kenmccrary.jtella.ConnectionData

public class ConnectionData
extends java.lang.Object

Provides a linkage between the Servant and JTella. ConnectionInformation is used by GNUTellaConnection and others in determining current parameters settable by the Servant application.


Constructor Summary
ConnectionData()
           
 
Method Summary
 java.lang.String getConnectionGreeting()
          Get the connection handshake greeting
 int getIncomingPort()
          Get the port to used for incoming connections Defaults to 6346.
 int getIncommingConnectionCount()
          Get the requested number of incomming connection return requested incomming connection count
 int getOutgoingConnectionCount()
          Returns the requested number of outgoing connections
 int getSharedFileCount()
          Get the value for shared file count
 int getSharedFileSize()
          Get the value for shared file size, this is the total size of shared files
 java.lang.String getVendorCode()
          Get Vendor code for use in QueryReply messages.
 void setConnectionGreeting(java.lang.String greeting)
          Set the connection handshake greeting.
 void setIncomingPort(int port)
          Set the port to used for incomming connections.
 void setIncommingConnectionCount(int count)
          Set the requesting number of incomming connections.
 void setOutgoingConnectionCount(int count)
          Set the requested number of outgoing connections.
 void setSharedFileCount(int count)
          Set the value for current number of shared files Defaults to zero
 void setSharedFileSize(int size)
          Set the value for shared file size Defaults to zero
 void setVendorCode(java.lang.String vendorCode)
          Set Vendor code for use in QueryReply messages.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConnectionData

public ConnectionData()
Method Detail

getOutgoingConnectionCount

public int getOutgoingConnectionCount()
Returns the requested number of outgoing connections
Returns:
requested outgoing connection count

setOutgoingConnectionCount

public void setOutgoingConnectionCount(int count)
Set the requested number of outgoing connections. Defaults to two connections
Parameters:
count - count of desired output connections

getIncommingConnectionCount

public int getIncommingConnectionCount()
Get the requested number of incomming connection return requested incomming connection count

setIncommingConnectionCount

public void setIncommingConnectionCount(int count)
Set the requesting number of incomming connections. Defaults to four connections
Parameters:
count - count of requested incomming connections

getIncomingPort

public int getIncomingPort()
Get the port to used for incoming connections Defaults to 6346. This property must be set appropriately before constructing NetworkConnection
Returns:
port number

setIncomingPort

public void setIncomingPort(int port)
Set the port to used for incomming connections. The port number defaults to 6346. This property must be set appropriately before constructions NetworkConnection
Returns:
port number

getSharedFileCount

public int getSharedFileCount()
Get the value for shared file count
Returns:
shared file count

setSharedFileCount

public void setSharedFileCount(int count)
Set the value for current number of shared files Defaults to zero
Parameters:
count - number of shared files

getSharedFileSize

public int getSharedFileSize()
Get the value for shared file size, this is the total size of shared files
Returns:
shared file size in KB

setSharedFileSize

public void setSharedFileSize(int size)
Set the value for shared file size Defaults to zero
Parameters:
size - size of shared files in KB

getConnectionGreeting

public java.lang.String getConnectionGreeting()
Get the connection handshake greeting
Returns:
connection greeting

setConnectionGreeting

public void setConnectionGreeting(java.lang.String greeting)
Set the connection handshake greeting. Using alternate greetings can create private greetings. The default value is GNUTELLA CONNECT/0.4\n\n
Parameters:
greeting -  

getVendorCode

public java.lang.String getVendorCode()
Get Vendor code for use in QueryReply messages. Vendor code is a 4 character code that must be registered with the GDF
Returns:
vendor code

setVendorCode

public void setVendorCode(java.lang.String vendorCode)
Set Vendor code for use in QueryReply messages. Vendor code is a 4 character code that must be registered with the GDF
Parameters:
vendorCode - 4 character code