public class IoContext extends CoreContext
IoContext
is used to extend the core context with IO related metadata
that is useful during event generation.Context.ExportFormat
Constructor and Description |
---|
IoContext(CoreContext ctx,
SocketAddress localSocket,
SocketAddress remoteSocket,
Optional<String> bucket)
Creates a new IO Context.
|
Modifier and Type | Method and Description |
---|---|
Optional<String> |
bucket()
Returns the bucket name if present.
|
void |
injectExportableParams(Map<String,Object> input)
This method needs to be implemented by the actual context implementations to
inject the params they need for exporting.
|
SocketAddress |
localSocket()
Returns the local socket.
|
SocketAddress |
remoteSocket()
Returns the remote socket.
|
alternateAddress, alternateAddress, authenticator, core, environment, id
exportAsString, toString
public IoContext(CoreContext ctx, SocketAddress localSocket, SocketAddress remoteSocket, Optional<String> bucket)
ctx
- the core context as a parent.localSocket
- the local io socket.remoteSocket
- the remote io socket.bucket
- the bucket name, if it makes sense.public void injectExportableParams(Map<String,Object> input)
AbstractContext
injectExportableParams
in class CoreContext
input
- pass exportable params in here.public SocketAddress localSocket()
public SocketAddress remoteSocket()
Copyright © 2021 Couchbase, Inc.. All rights reserved.