- java.lang.Object
-
- org.shredzone.acme4j.AcmeResource
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
AcmeJsonResource
,Certificate
public abstract class AcmeResource extends Object implements Serializable
This is the root class of all ACME resources (like accounts, orders, certificates). Every resource is identified by its location URL.This class also takes care for proper serialization and de-serialization of the resource. After de-serialization, the resource must be bound to a
Login
again, usingrebind(Login)
.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AcmeResource(Login login, URL location)
Create a newAcmeResource
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
finalize()
URL
getLocation()
Gets the resource's location.protected Login
getLogin()
Gets theLogin
this resource is bound with.protected Session
getSession()
Gets theSession
this resource is bound with.void
rebind(Login login)
Rebinds this resource to aLogin
.
-
-
-
Constructor Detail
-
AcmeResource
protected AcmeResource(Login login, URL location)
Create a newAcmeResource
.
-
-
Method Detail
-
getSession
protected Session getSession()
Gets theSession
this resource is bound with.
-
rebind
public void rebind(Login login)
Rebinds this resource to aLogin
.Logins are not serialized, because they contain volatile session data and also a private key. After de-serialization of an
AcmeResource
, use this method to rebind it to aLogin
.- Parameters:
login
-Login
to bind this resource to
-
getLocation
public URL getLocation()
Gets the resource's location.
-
-