Package org.infinispan.cli.impl
Class ContextImpl
java.lang.Object
org.infinispan.cli.impl.ContextImpl
- All Implemented Interfaces:
Closeable,AutoCloseable,org.aesh.readline.AeshContext,Context
- Direct Known Subclasses:
KubernetesContext
public class ContextImpl
extends Object
implements Context, org.aesh.readline.AeshContext, Closeable
ContextImpl.
- Since:
- 5.2
- Author:
- Tristan Tarrant
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.infinispan.cli.Context
Context.Property -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.aesh.command.CommandResultchangeResource(Class<? extends Resource> fromResource, String resourceType, String name) voidclose()Connects to a serverconnect(org.aesh.command.shell.Shell shell, String connectionString, String username, String password) Connect to a server using the supplied username and passwordvoidDisconnects from the serverexportedVariable(String key) Returns the currentConnectionorg.aesh.io.Resourceorg.infinispan.commons.dataconversion.MediaTypegetProperty(String key) getProperty(Context.Property property) org.aesh.command.registry.CommandRegistry<? extends org.aesh.command.invocation.CommandInvocation>booleanvoidvoidvoidvoidsetConsole(org.aesh.readline.ReadlineConsole console) voidsetCurrentWorkingDirectory(org.aesh.io.Resource cwd) voidsetEncoding(org.infinispan.commons.dataconversion.MediaType encoding) voidsetProperty(String key, String value) voidsetRegistry(org.aesh.command.registry.CommandRegistry<? extends org.aesh.command.invocation.CommandInvocation> registry) voidsetSslContext(SSLContextSettings sslContext)
-
Constructor Details
-
ContextImpl
-
-
Method Details
-
getConfigPath
- Specified by:
getConfigPathin interfaceContext
-
isConnected
public boolean isConnected()- Specified by:
isConnectedin interfaceContext
-
setProperty
- Specified by:
setPropertyin interfaceContext
-
getProperty
- Specified by:
getPropertyin interfaceContext
-
getProperty
- Specified by:
getPropertyin interfaceContext
-
getProperties
- Specified by:
getPropertiesin interfaceContext
-
resetProperties
public void resetProperties()- Specified by:
resetPropertiesin interfaceContext
-
saveProperties
public void saveProperties()- Specified by:
savePropertiesin interfaceContext
-
setSslContext
- Specified by:
setSslContextin interfaceContext
-
connect
Description copied from interface:ContextConnects to a server -
connect
public Connection connect(org.aesh.command.shell.Shell shell, String connectionString, String username, String password) Description copied from interface:ContextConnect to a server using the supplied username and password -
refreshPrompt
public void refreshPrompt()- Specified by:
refreshPromptin interfaceContext
-
changeResource
public org.aesh.command.CommandResult changeResource(Class<? extends Resource> fromResource, String resourceType, String name) throws org.aesh.command.CommandException - Specified by:
changeResourcein interfaceContext- Throws:
org.aesh.command.CommandException
-
disconnect
public void disconnect()Description copied from interface:ContextDisconnects from the server- Specified by:
disconnectin interfaceContext
-
getEncoding
public org.infinispan.commons.dataconversion.MediaType getEncoding()- Specified by:
getEncodingin interfaceContext
-
setEncoding
public void setEncoding(org.infinispan.commons.dataconversion.MediaType encoding) - Specified by:
setEncodingin interfaceContext
-
setConsole
public void setConsole(org.aesh.readline.ReadlineConsole console) - Specified by:
setConsolein interfaceContext
-
getRegistry
public org.aesh.command.registry.CommandRegistry<? extends org.aesh.command.invocation.CommandInvocation> getRegistry()- Specified by:
getRegistryin interfaceContext
-
setRegistry
public void setRegistry(org.aesh.command.registry.CommandRegistry<? extends org.aesh.command.invocation.CommandInvocation> registry) - Specified by:
setRegistryin interfaceContext
-
getConnection
Description copied from interface:ContextReturns the currentConnection- Specified by:
getConnectionin interfaceContext- Returns:
-
getCurrentWorkingDirectory
public org.aesh.io.Resource getCurrentWorkingDirectory()- Specified by:
getCurrentWorkingDirectoryin interfaceorg.aesh.readline.AeshContext
-
setCurrentWorkingDirectory
public void setCurrentWorkingDirectory(org.aesh.io.Resource cwd) - Specified by:
setCurrentWorkingDirectoryin interfaceorg.aesh.readline.AeshContext
-
exportedVariableNames
- Specified by:
exportedVariableNamesin interfaceorg.aesh.readline.AeshContext
-
exportedVariable
- Specified by:
exportedVariablein interfaceorg.aesh.readline.AeshContext
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-