com.atlassian.aws.ec2
Class Ec2UtilsThin

java.lang.Object
  extended by com.atlassian.aws.ec2.Ec2UtilsThin

public final class Ec2UtilsThin
extends Object

Ideally, this class should only have standard JDK dependencies. It can use non-standard annotations though.


Method Summary
static EC2Instance getLocalEC2Instance()
           
static
<T> T
getUserData(Class<T> aClass)
          Retrieves a serialised object from the EC2 user data for the current host.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getLocalEC2Instance

@NotNull
public static EC2Instance getLocalEC2Instance()
                                       throws IOException
Returns:
The EC2Instance upon which the current JVM is hosted.
Throws:
IOException - if necessary data could not be read.

getUserData

public static <T> T getUserData(Class<T> aClass)
                     throws IOException,
                            ClassNotFoundException

Retrieves a serialised object from the EC2 user data for the current host.

Returns:
The retrieved object.
Throws:
IOException - If the user data could not be read or deserialised.
ClassNotFoundException - If a required Class could not be found.


Copyright © 2015 Atlassian. All rights reserved.