Package org.xnio.conduits

# Class AbstractSynchronizedConduit<D extends Conduit>

java.lang.Object
org.xnio.conduits.AbstractConduit<D>
org.xnio.conduits.AbstractSynchronizedConduit<D>

All Implemented Interfaces:
  `Conduit`

Direct Known Subclasses:
  `AbstractSynchronizedSinkConduit`, `AbstractSynchronizedSourceConduit`

public abstract class AbstractSynchronizedConduit<D extends Conduit> extends AbstractConduit<D>
An abstract synchronized conduit. All conduit operations are wrapped in synchronization blocks for simplified thread safety.

Author:
  David M. Lloyd

## Field Summary

Fields
Modifier and Type
Field
Description
`protected final Object`
`lock`

### Fields inherited from class org.xnio.conduits.AbstractConduit

`next`

## Constructor Summary

Constructors
Modifier
Constructor
Description
`protected`
`AbstractSynchronizedConduit(D next)`
Construct a new instance.
`protected`
`AbstractSynchronizedConduit(D next, Object lock)`
Construct a new instance.

## Method Summary

### Methods inherited from class org.xnio.conduits.AbstractConduit

`getWorker`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### lock

protected final Object lock

## Constructor Details

### AbstractSynchronizedConduit

protected AbstractSynchronizedConduit(D next)
Construct a new instance. A new lock object is created.

Parameters:
  `next` - the next conduit in the chain

### AbstractSynchronizedConduit

protected AbstractSynchronizedConduit(D next, Object lock)
Construct a new instance.

Parameters:
  `next` - the next conduit in the chain
  `lock` - the lock object to use