Package org.refcodes.component
Interface Closable.CloseBuilder<B extends Closable.CloseBuilder<B>>
-
- Type Parameters:
B
- The instance to be returned on which to apply succeeding builder operations.
- All Known Subinterfaces:
ConnectionComponent.ConnectionComponentBuilder<CON,B>
,LinkComponent.LinkComponentBuilder<B>
- Enclosing interface:
- Closable
public static interface Closable.CloseBuilder<B extends Closable.CloseBuilder<B>>
To enable theClosable
functionality to be invoked in a builder chain.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description B
withClose()
Builder method for theClosable.close()
method.B
withCloseIn(int aCloseInMillis)
Builder method for theClosable.closeIn( int )
method.B
withCloseQuietly()
Builder method for theClosable.closeQuietly()
method.default B
withCloseUnchecked()
Closes the component by callingwithClose()
without you to require catching anCloseException
.
-
-
-
Method Detail
-
withClose
B withClose() throws CloseException
Builder method for theClosable.close()
method.- Returns:
- The instance to be returned on which to apply succeeding builder operations.
- Throws:
CloseException
- in case closing or pre-closing (flushing) fails.
-
withCloseQuietly
B withCloseQuietly()
Builder method for theClosable.closeQuietly()
method.- Returns:
- The instance to be returned on which to apply succeeding builder operations.
-
withCloseIn
B withCloseIn(int aCloseInMillis)
Builder method for theClosable.closeIn( int )
method.- Parameters:
aCloseInMillis
- The time in milliseconds to pass tillClosable.close()
is called.- Returns:
- The instance to be returned on which to apply succeeding builder operations.
-
withCloseUnchecked
default B withCloseUnchecked()
Closes the component by callingwithClose()
without you to require catching anCloseException
.- Returns:
- The instance to be returned on which to apply succeeding builder operations.
- Throws:
CloseException.CloseRuntimeException
- encapsulates the cause and is thrown upon encountering aCloseException
exception
-
-