Package com.couchbase.client.core.io
Class IoContext
- java.lang.Object
-
- com.couchbase.client.core.cnc.AbstractContext
-
- com.couchbase.client.core.CoreContext
-
- com.couchbase.client.core.io.IoContext
-
- All Implemented Interfaces:
Context
public class IoContext extends CoreContext
TheIoContext
is used to extend the core context with IO related metadata that is useful during event generation.- Since:
- 2.0.0
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.couchbase.client.core.cnc.Context
Context.ExportFormat
-
-
Constructor Summary
Constructors Constructor Description IoContext(CoreContext ctx, SocketAddress localSocket, SocketAddress remoteSocket, Optional<String> bucket)
Creates a new IO Context.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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.-
Methods inherited from class com.couchbase.client.core.CoreContext
alternateAddress, alternateAddress, authenticator, core, environment, id
-
Methods inherited from class com.couchbase.client.core.cnc.AbstractContext
exportAsString, toString
-
-
-
-
Constructor Detail
-
IoContext
public IoContext(CoreContext ctx, SocketAddress localSocket, SocketAddress remoteSocket, Optional<String> bucket)
Creates a new IO Context.- Parameters:
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.
-
-
Method Detail
-
injectExportableParams
public void injectExportableParams(Map<String,Object> input)
Description copied from class:AbstractContext
This method needs to be implemented by the actual context implementations to inject the params they need for exporting.- Overrides:
injectExportableParams
in classCoreContext
- Parameters:
input
- pass exportable params in here.
-
localSocket
public SocketAddress localSocket()
Returns the local socket.
-
remoteSocket
public SocketAddress remoteSocket()
Returns the remote socket.
-
-