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 classType safe key for storage of user attributes. -
Method Summary
Modifier and TypeMethodDescription<T> TReturns the value of the user-defined attribute.intstatic AttributeRepositoryofAttributesMap(Map<AttributeRepository.AttributeKey<?>, ?> attributes) static <A> AttributeRepositoryofKeyValuePair(AttributeRepository.AttributeKey<A> key, A value) default <T> TAttempts 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:
nullif 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:
nullif 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
Collectionsnapshot of all the currently registered attributes in the repository
-
ofKeyValuePair
-
ofAttributesMap
-