diff options
Diffstat (limited to 'jrt/src/com/yahoo/jrt/Target.java')
-rw-r--r-- | jrt/src/com/yahoo/jrt/Target.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/jrt/src/com/yahoo/jrt/Target.java b/jrt/src/com/yahoo/jrt/Target.java index 1bfae3b712d..e18f0bba7b6 100644 --- a/jrt/src/com/yahoo/jrt/Target.java +++ b/jrt/src/com/yahoo/jrt/Target.java @@ -2,6 +2,8 @@ package com.yahoo.jrt; +import java.util.Optional; + /** * A Target represents a connection endpoint with RPC * capabilities. Each such connection has a client and a server @@ -68,6 +70,11 @@ public abstract class Target { public Exception getConnectionLostReason() { return null; } /** + * @return the security context associated with this target, or empty if no connection or is insecure. + */ + public abstract Optional<SecurityContext> getSecurityContext(); + + /** * Check if this target represents the client side of a * connection. * |