Class AuthenticationDataSubscription
- java.lang.Object
-
- org.apache.pulsar.broker.authentication.AuthenticationDataSubscription
-
- All Implemented Interfaces:
AuthenticationDataSource
public class AuthenticationDataSubscription extends java.lang.Object implements AuthenticationDataSource
-
-
Constructor Summary
Constructors Constructor Description AuthenticationDataSubscription(AuthenticationDataSource authData, java.lang.String subscription)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetCommandData()java.net.SocketAddressgetPeerAddress()java.lang.StringgetSubscription()Subscription name can be necessary for consumption.java.security.cert.Certificate[]getTlsCertificates()booleanhasDataFromCommand()Check if data from Pulsar protocol are available.booleanhasDataFromPeer()Check if data from peer are available.booleanhasDataFromTls()Check if data from TLS are available.booleanhasSubscription()Check if subscription is defined available.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.pulsar.broker.authentication.AuthenticationDataSource
authenticate, getHttpAuthType, getHttpHeader, hasDataFromHttp, setSubscription
-
-
-
-
Constructor Detail
-
AuthenticationDataSubscription
public AuthenticationDataSubscription(AuthenticationDataSource authData, java.lang.String subscription)
-
-
Method Detail
-
hasDataFromCommand
public boolean hasDataFromCommand()
Description copied from interface:AuthenticationDataSourceCheck if data from Pulsar protocol are available.- Specified by:
hasDataFromCommandin interfaceAuthenticationDataSource- Returns:
- true if this authentication data contain data from Pulsar protocol
-
getCommandData
public java.lang.String getCommandData()
- Specified by:
getCommandDatain interfaceAuthenticationDataSource- Returns:
- authentication data which is stored in a command
-
hasDataFromPeer
public boolean hasDataFromPeer()
Description copied from interface:AuthenticationDataSourceCheck if data from peer are available.- Specified by:
hasDataFromPeerin interfaceAuthenticationDataSource- Returns:
- true if this authentication data contain data from peer
-
getPeerAddress
public java.net.SocketAddress getPeerAddress()
- Specified by:
getPeerAddressin interfaceAuthenticationDataSource- Returns:
- a
Stringcontaining the IP address of the client
-
hasDataFromTls
public boolean hasDataFromTls()
Description copied from interface:AuthenticationDataSourceCheck if data from TLS are available.- Specified by:
hasDataFromTlsin interfaceAuthenticationDataSource- Returns:
- true if this authentication data contain data from TLS
-
getTlsCertificates
public java.security.cert.Certificate[] getTlsCertificates()
- Specified by:
getTlsCertificatesin interfaceAuthenticationDataSource- Returns:
- a client certificate chain, or null if the data are not available
-
hasSubscription
public boolean hasSubscription()
Description copied from interface:AuthenticationDataSourceCheck if subscription is defined available.- Specified by:
hasSubscriptionin interfaceAuthenticationDataSource- Returns:
- true if this authentication data contain subscription
-
getSubscription
public java.lang.String getSubscription()
Description copied from interface:AuthenticationDataSourceSubscription name can be necessary for consumption.- Specified by:
getSubscriptionin interfaceAuthenticationDataSource- Returns:
- a
Stringcontaining the subscription name
-
-