Exports the obtained local/public addresses via the getFace() and getMask() methods.
This commit is contained in:
parent
89082b2c1a
commit
5f67322b90
@ -71,6 +71,7 @@ public class AwsCandidateHarvester
|
|||||||
{
|
{
|
||||||
super(null, null);
|
super(null, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Maps all candidates to this harvester's mask and adds them to
|
* Maps all candidates to this harvester's mask and adds them to
|
||||||
* <tt>component</tt>.
|
* <tt>component</tt>.
|
||||||
@ -174,6 +175,34 @@ public class AwsCandidateHarvester
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the discovered public (mask) address, or null.
|
||||||
|
* @return the discovered public (mask) address, or null.
|
||||||
|
*/
|
||||||
|
public static TransportAddress getMask()
|
||||||
|
{
|
||||||
|
if (smellsLikeAnEC2())
|
||||||
|
{
|
||||||
|
obtainEC2Addresses();
|
||||||
|
return mask;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the discovered local (face) address, or null.
|
||||||
|
* @return the discovered local (face) address, or null.
|
||||||
|
*/
|
||||||
|
public static TransportAddress getFace()
|
||||||
|
{
|
||||||
|
if (smellsLikeAnEC2())
|
||||||
|
{
|
||||||
|
obtainEC2Addresses();
|
||||||
|
return face;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determines if there is a decent chance for the box executing this
|
* Determines if there is a decent chance for the box executing this
|
||||||
* application to be an AWS EC2 instance and returns <tt>true</tt> if so.
|
* application to be an AWS EC2 instance and returns <tt>true</tt> if so.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user