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.
|
String |
localHostname()
Returns the local hostname, might be null if not available.
|
int |
localPort()
Returns the local port, might be 0 if not available.
|
SocketAddress |
localSocket()
Returns the local socket.
|
SocketAddress |
remoteSocket()
Returns the remote socket.
|
alternateAddress, alternateAddress, authenticator, core, environment, idexportAsMap, exportAsString, toStringpublic 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)
AbstractContextinjectExportableParams in class CoreContextinput - pass exportable params in here.public SocketAddress localSocket()
public SocketAddress remoteSocket()
public String localHostname()
public int localPort()
Copyright © 2024 Couchbase, Inc.. All rights reserved.