I fear this class doesn't operate on a consistent abstraction layer -- you're representing both the domain object "connection" and the syntactic representation of a connection in one class. I feel like those layers of abstraction need to be cleanly separated.