This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// delete a volume | |
final SecureVolume vol; | |
final List<SecureVolume> volList; | |
volList = saife.listVolumes(); | |
vol = volList.get(0); | |
saife.removeVolume(vol); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// create a volume | |
final SecureVolume.VolumeType vt = SecureVolume.VolumeType.PERMANENT; | |
final String vFile = "/some/path/to/file"; | |
final String volLabel = "some_label"; | |
// must be multiple of 1024, at least 10MB | |
final long volSize = 1024 * 1024 * 10; | |
final SecureVolume vol; | |
try { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This retrieve or creates a network share manager. | |
// these will varry with implementation | |
final String shareID = "some_text"; | |
final String storagePath = "/some/path"; | |
final PersistentStore persistentStore = new Persister(); | |
final NetworkShare ns; | |
// create a manager | |
final NetworkShareManager mgr = new NetworkShareManager(saife); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SecureCommsGroup group; | |
List<String> groups = saife.ListGroups(); | |
try { | |
group = saife.getGroup(groups.get(0)); | |
} catch (final GroupNotFoundException gnfe) { | |
final String m = gnfe.getMessage(); | |
System.out.println(m); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MessageListener implements SecureCommsGroupListener { | |
public MessageListener() { | |
} | |
@Override | |
public void groupDestroyed(String groupID, String groupName) { | |
System.out.println("group was destroyed: " + groupName); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SecureCommsGroup group; | |
List<String> groups = saife.ListGroups(); | |
String message = "some message"; | |
try { | |
group = saife.getGroup(groups.get(0)); | |
} catch (final GroupNotFoundException gnfe) { | |
final String m = gnfe.getMessage(); | |
System.out.println(m); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SecureCommsGroup group; | |
List<String> groups = saife.ListGroups(); | |
Contact contact; | |
try { | |
group = saife.getGroup(groups.get(0)); | |
contact = saife.getContactsByName("client1").get(0); | |
} catch (final NoSuchContactException nsce) { | |
final String m = nsce.getMessage(); | |
System.out.println(m); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SecureCommsGroup group; | |
List<String> groups = saife.ListGroups(); | |
Contact contact; | |
try { | |
group = saife.getGroup(groups.get(0)); | |
contact = saife.getContactsByName("client1").get(0); | |
} catch (final NoSuchContactException nsce) { | |
final String m = nsce.getMessage(); | |
System.out.println(m); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SecureCommsGroup group; | |
List<String> groups = saife.ListGroups(); | |
try { | |
group = saife.getGroup(groups.get(0)); | |
} catch (final GroupNotFoundException gnfe) { | |
final String m = gnfe.getMessage(); | |
System.out.println(m); | |
} |
NewerOlder