Last active
April 22, 2016 00:15
-
-
Save jabocg/95879edecbed596159fe78fcf8e39107 to your computer and use it in GitHub Desktop.
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
List<Contact> contacts = new Vector<Contact>(); | |
SecureCommsGroup group; | |
try { | |
// add some members to a List | |
contacts.add(saife.getContactsByName("client1").get(0)); | |
contacts.add(saife.getContactsByName("client2").get(0)); | |
contacts.addAll(saife.getContactsByName("user")); | |
} catch (final NoSuchContactException nsce) { | |
final String m = imse.getMessage(); | |
System.out.println(m); | |
} catch (final InvalidManagementStateException imse) { | |
final String m = imse.getMessage(); | |
System.out.println(m); | |
} | |
try { | |
// creates a secure communications group | |
// members *MUST* be in an omnigroup together | |
group = saife.createGroup("group1", contacts); | |
} catch (final ContactGroupNotFoundException cgnfe) { | |
final String m = cgnfe.getMessage(); | |
System.out.println(m); | |
} catch (final IllegalArgumentException iae) { | |
final String m = iae.getMessage(); | |
System.out.println(m); | |
} catch (final IOException ioe) { | |
final String m = ioe.getMessage(); | |
System.out.println(m); | |
} catch (final KeySizeNotSupportedException ksnse) { | |
final String m = ksnse.getMessage(); | |
System.out.println(m); | |
} catch (final UnlockRequiredException ure) { | |
final String m = ure.getMessage(); | |
System.out.println(m); | |
} catch (final Exception e) { | |
final String m = e.getMessage(); | |
System.out.println(m); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment