org.tranche.network
Class Connection

java.lang.Object
  extended by org.tranche.network.Connection

public class Connection
extends java.lang.Object

Container for objects related to a Tranche server connection.

Author:
James "Augie" Hill - augman85@gmail.com

Constructor Summary
Connection(TrancheServer trancheServer, boolean locked)
           
 
Method Summary
 void clearExceptions()
           
 java.lang.Exception getException(int index)
           
 int getExceptionCount()
           
 java.util.List<java.lang.Exception> getExceptions()
           
 int getLockCount()
           
 RemoteTrancheServer getRemoteTrancheServer()
           
 TrancheServer getTrancheServer()
           
 boolean isLocked()
           
 void lock()
           
 boolean reportException(java.lang.Exception e)
           
 void unlock()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Connection

public Connection(TrancheServer trancheServer,
                  boolean locked)
Parameters:
trancheServer -
locked -
Method Detail

getTrancheServer

public TrancheServer getTrancheServer()
Returns:

getRemoteTrancheServer

public RemoteTrancheServer getRemoteTrancheServer()
Returns:

getExceptions

public java.util.List<java.lang.Exception> getExceptions()
Returns:

getException

public java.lang.Exception getException(int index)
Parameters:
index -
Returns:

reportException

public boolean reportException(java.lang.Exception e)
Parameters:
e -
Returns:

getExceptionCount

public int getExceptionCount()
Returns:

clearExceptions

public void clearExceptions()

isLocked

public boolean isLocked()
Returns:

getLockCount

public int getLockCount()
Returns:

lock

public void lock()

unlock

public void unlock()


This code is free for use both commercially and non-commercially as stated in the project's license