32 lines
1.2 KiB
Java
32 lines
1.2 KiB
Java
|
package org.gcube.portal.event.publisher.lr62;
|
||
|
|
||
|
import org.gcube.event.publisher.AbstractEventPublisher;
|
||
|
import org.gcube.event.publisher.EventSender;
|
||
|
import org.json.simple.JSONObject;
|
||
|
|
||
|
import com.liferay.portal.kernel.log.Log;
|
||
|
import com.liferay.portal.kernel.log.LogFactoryUtil;
|
||
|
|
||
|
public abstract class AbstractLR62EventPublisher extends AbstractEventPublisher {
|
||
|
|
||
|
protected static final Log log = LogFactoryUtil.getLog(AbstractLR62EventPublisher.class);
|
||
|
|
||
|
public AbstractLR62EventPublisher() {
|
||
|
super();
|
||
|
}
|
||
|
|
||
|
protected EventSender createEventSender() {
|
||
|
// OpenIdConnectConfiguration openIdConnectConfiguration = LiferayOpenIdConnectConfiguration.getConfiguration();
|
||
|
// EventPublisherConfiguration eventPublisherConfiguration = EventPublisherConfiguration.getConfiguration();
|
||
|
// return new HTTPEventSender(eventPublisherConfiguration.getEventPublisherURL(),
|
||
|
// openIdConnectConfiguration.getPortalClientId(), openIdConnectConfiguration.getPortalClientSecret(),
|
||
|
// openIdConnectConfiguration.getTokenURL());
|
||
|
return new EventSender() {
|
||
|
@Override
|
||
|
public void send(JSONObject event) {
|
||
|
System.out.println(event);
|
||
|
}
|
||
|
};
|
||
|
}
|
||
|
|
||
|
}
|