/** * Create a new {@link AcmeResource}. * * @param login * {@link Login} the resource is bound with * @param location * Location {@link URL} of this resource */ protected AcmeResource(Login login, URL location) { this.location = Objects.requireNonNull(location, "location"); rebind(login); }
/** * Gets the {@link Session} this resource is bound with. */ protected Session getSession() { return getLogin().getSession(); }
/** * Creates a new {@link AcmeLazyLoadingException}. * * @param resource * {@link AcmeResource} to be loaded * @param cause * {@link AcmeException} that was raised */ public AcmeLazyLoadingException(AcmeResource resource, AcmeException cause) { super(requireNonNull(resource).getClass().getSimpleName() + " " + requireNonNull(resource).getLocation(), requireNonNull(cause)); type = resource.getClass(); location = resource.getLocation(); }
/** * Gets the {@link Session} this resource is bound with. */ protected Session getSession() { return getLogin().getSession(); }
/** * Creates a new {@link AcmeLazyLoadingException}. * * @param resource * {@link AcmeResource} to be loaded * @param cause * {@link AcmeException} that was raised */ public AcmeLazyLoadingException(AcmeResource resource, AcmeException cause) { super(requireNonNull(resource).getClass().getSimpleName() + " " + requireNonNull(resource).getLocation(), requireNonNull(cause)); type = resource.getClass(); location = resource.getLocation(); }
/** * Create a new {@link AcmeResource}. * * @param login * {@link Login} the resource is bound with * @param location * Location {@link URL} of this resource */ protected AcmeResource(Login login, URL location) { this.location = Objects.requireNonNull(location, "location"); rebind(login); }