com.github.dockerjava.api.model
Class Bind

java.lang.Object
  extended by com.github.dockerjava.api.model.Bind

public class Bind
extends Object

Represents a host path being bind mounted as a Volume in a Docker container. The Bind can be in read only or read write access mode.


Constructor Summary
Bind(String path, Volume volume)
           
Bind(String path, Volume volume, AccessMode accessMode)
           
Bind(String path, Volume volume, boolean readOnly)
          Deprecated. use Bind(String, Volume, AccessMode)
 
Method Summary
 boolean equals(Object obj)
           
 AccessMode getAccessMode()
           
 String getPath()
           
 Volume getVolume()
           
 int hashCode()
           
 boolean isReadOnly()
          Deprecated. use getAccessMode()
static Bind parse(String serialized)
          Parses a bind mount specification to a Bind.
 String toString()
          Returns a string representation of this Bind suitable for inclusion in a JSON message.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Bind

public Bind(String path,
            Volume volume)

Bind

public Bind(String path,
            Volume volume,
            AccessMode accessMode)

Bind

@Deprecated
public Bind(String path,
                       Volume volume,
                       boolean readOnly)
Deprecated. use Bind(String, Volume, AccessMode)

Method Detail

getPath

public String getPath()

getVolume

public Volume getVolume()

getAccessMode

public AccessMode getAccessMode()

isReadOnly

@Deprecated
public boolean isReadOnly()
Deprecated. use getAccessMode()


parse

public static Bind parse(String serialized)
Parses a bind mount specification to a Bind.

Parameters:
serialized - the specification, e.g. /host:/container:ro
Returns:
a Bind matching the specification
Throws:
IllegalArgumentException - if the specification cannot be parsed

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Returns a string representation of this Bind suitable for inclusion in a JSON message. The format is <host path>:<container path>:<access mode>, like the argument in parse(String).

Overrides:
toString in class Object
Returns:
a string representation of this Bind


Copyright © 2014. All rights reserved.