Package org.apache.sshd.common
Interface AttributeRepository
- All Known Subinterfaces:
AttributeStore
,Channel
,ClientChannel
,ClientFactoryManager
,ClientSession
,FactoryManager
,ServerChannel
,ServerFactoryManager
,ServerSession
,Session
,SessionContext
- All Known Implementing Classes:
AbstractChannel
,AbstractClientChannel
,AbstractClientSession
,AbstractFactoryManager
,AbstractServerChannel
,AbstractServerSession
,AbstractSession
,AgentForwardedChannel
,ChannelAgentForwarding
,ChannelDirectTcpip
,ChannelExec
,ChannelForwardedX11
,ChannelSession
,ChannelSession
,ChannelShell
,ChannelSubsystem
,ClientSessionImpl
,DefaultSftpClient.SftpChannelSubsystem
,DirectoryHandle
,FileHandle
,Handle
,PtyCapableChannelSession
,ServerSessionImpl
,SessionHelper
,SshClient
,SshServer
,TcpipClientChannel
,TcpipServerChannel
public interface AttributeRepository
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic class
Type safe key for storage of user attributes. -
Method Summary
Modifier and TypeMethodDescription<T> T
Returns the value of the user-defined attribute.int
static AttributeRepository
ofAttributesMap
(Map<AttributeRepository.AttributeKey<?>, ?> attributes) static <A> AttributeRepository
ofKeyValuePair
(AttributeRepository.AttributeKey<A> key, A value) default <T> T
Attempts to resolve the associated value by going up the store's hierarchy (if any)
-
Method Details
-
getAttributesCount
int getAttributesCount()- Returns:
- Current number of user-defined attributes stored in the repository
-
getAttribute
Returns the value of the user-defined attribute.- Type Parameters:
T
- The generic attribute type- Parameters:
key
- The key of the attribute; must not benull
.- Returns:
null
if there is no value associated with the specified key
-
resolveAttribute
Attempts to resolve the associated value by going up the store's hierarchy (if any)- Type Parameters:
T
- The generic attribute type- Parameters:
key
- The key of the attribute; must not benull
.- Returns:
null
if there is no value associated with the specified key either in this repository or any of its ancestors (if any available)
-
attributeKeys
Collection<AttributeRepository.AttributeKey<?>> attributeKeys()- Returns:
- A
Collection
snapshot of all the currently registered attributes in the repository
-
ofKeyValuePair
-
ofAttributesMap
-