The garda said she was on duty at Watery Lane, Clondalkin on March 22 last year when she encountered Greene, who had his hood up.
He started verbally abusing her, calling her a “dirtbird” and saying she was “nothing but a c**t”. He also made a remark about masturbating, the garda told Judge Gerard Jones.
Greene was already serving a prison sentence for possession of drugs when the case came before the court. Defence solicitor Wayne Kenny said Greene apologised “profusely” to the garda for his behaviour.
He had been addicted to tablets and going through a difficult time.
Judge Jones noted there had been no interaction between the accused and the garda before the abuse and said he was taking this into consideration in sentencing.