com.github.dockerjava.core.command
Class AuthCmdImpl

java.lang.Object
  extended by com.github.dockerjava.core.command.AbstrDockerCmd<T,RES_T>
      extended by com.github.dockerjava.core.command.AbstrAuthCfgDockerCmd<AuthCmd,AuthResponse>
          extended by com.github.dockerjava.core.command.AuthCmdImpl
All Implemented Interfaces:
AuthCmd, DockerCmd<AuthResponse>

public class AuthCmdImpl
extends AbstrAuthCfgDockerCmd<AuthCmd,AuthResponse>
implements AuthCmd

Authenticate with the server, useful for checking authentication.


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.github.dockerjava.api.command.AuthCmd
AuthCmd.Exec
 
Field Summary
 
Fields inherited from class com.github.dockerjava.core.command.AbstrDockerCmd
execution
 
Constructor Summary
AuthCmdImpl(AuthCmd.Exec exec, AuthConfig authConfig)
           
 
Method Summary
 AuthResponse exec()
           
 String toString()
           
 
Methods inherited from class com.github.dockerjava.core.command.AbstrAuthCfgDockerCmd
getAuthConfig, registryAuth, withAuthConfig
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.github.dockerjava.api.command.AuthCmd
getAuthConfig, withAuthConfig
 

Constructor Detail

AuthCmdImpl

public AuthCmdImpl(AuthCmd.Exec exec,
                   AuthConfig authConfig)
Method Detail

exec

public AuthResponse exec()
                  throws UnauthorizedException
Specified by:
exec in interface AuthCmd
Specified by:
exec in interface DockerCmd<AuthResponse>
Overrides:
exec in class AbstrDockerCmd<AuthCmd,AuthResponse>
Returns:
The status. Based on it's value you may mean you need to authorise your account, e.g.: "Account created. Please see the documentation of the registry http://localhost:5000/v1/ for instructions how to activate it."
Throws:
UnauthorizedException - If you're not authorised (e.g. bad password).

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2014. All Rights Reserved.