org.abstracthorizon.danube.connection
Class ConnectionWrapper

java.lang.Object
  extended by org.abstracthorizon.danube.connection.ConnectionWrapper
All Implemented Interfaces:
Adaptable, Connection
Direct Known Subclasses:
AccessLogConnectionHandler.DateWrapper, HTTPConnectionImpl, LoggingConnection

public abstract class ConnectionWrapper
extends Object
implements Connection

Simple Connection wrapper class.

Author:
Daniel Sendula

Field Summary
protected  Connection connection
          Wrapped connection
protected  org.slf4j.Logger logger
          Logger
 
Constructor Summary
ConnectionWrapper(Connection connection)
          Constructor
 
Method Summary
<T> T
adapt(Class<T> cls)
          Adopts this object using supplied adopter manager
 void close()
          Closes the connection
 boolean isClosed()
          Checks if underlaying connection closed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected final org.slf4j.Logger logger
Logger


connection

protected Connection connection
Wrapped connection

Constructor Detail

ConnectionWrapper

public ConnectionWrapper(Connection connection)
Constructor

Parameters:
connection -
Method Detail

close

public void close()
Closes the connection

Specified by:
close in interface Connection

isClosed

public boolean isClosed()
Checks if underlaying connection closed

Specified by:
isClosed in interface Connection
Returns:
true if underlaying connection closed

adapt

public <T> T adapt(Class<T> cls)
Adopts this object using supplied adopter manager

Specified by:
adapt in interface Adaptable
Parameters:
cls - class to be adopted to
Returns:
this connection adopted to asked class


Copyright © 2005-2009 Abstract Horizon. All Rights Reserved.