public class PushServiceImpl extends Object implements PushService
PushService
Constructor and Description |
---|
PushServiceImpl() |
Modifier and Type | Method and Description |
---|---|
int |
countPushes()
Returns the number of
Push messages persisted. |
List<Push> |
findAllPush()
Returns a list of ALL the
Push messages
that are persisted.WARNING: This method can return A LOT of data |
List<Device> |
findDevicesForPush(Push push)
Finds a list of
Devices that was linked to a Push . |
Push |
findPushById(Long id)
Finds a
Push by its ID. |
List<PushDeviceTuple> |
findUnsentPushTuples()
Finds a list of unsent
PushDeviceTuple . |
DeviceService |
getDeviceService()
Get reference to the
DeviceService |
PushDeviceTupleService |
getPdtService()
A reference to the
PushDeviceTupleService |
PushDao |
getPushDao()
Gets the reference to the
PushDao |
SendServiceDelegator |
getSendService()
A reference to the
SendServiceDelegator responsible for delegating
push messages to appropriate implementations for different devices. |
boolean |
removePush(Push push)
Removes a
Push message. |
void |
savePush(Push push)
Persists a
Push message. |
void |
savePush(Push push,
List<Device> devices)
Persists a push messages that should be sent to many devices
|
int |
sendPush(List<PushDeviceTuple> tuples)
Attempts to send
PushDeviceTuple |
int |
sendPush(Push push,
Device device)
Sends a
Push message to the specified Device
without persisting the message. |
int |
sendPush(Push push,
List<Device> devices)
Sends a Push
|
void |
setDeviceService(DeviceService deviceService)
Set the reference to the
DeviceService for this ServiceImpl. |
void |
setPdtService(PushDeviceTupleService pdtService)
Set the reference to the
PushDeviceTupleService for this ServiceImpl. |
void |
setPushDao(PushDao dao)
Sets the reference to the
PushDao |
void |
setSendService(SendServiceDelegator sendService)
Set the reference to the
SendServiceDelegator for this ServiceImpl. |
public PushServiceImpl()
@Transactional public void savePush(Push push)
PushService
Push
message.savePush
in interface PushService
push
- Push message to persist.@Transactional public boolean removePush(Push push)
PushService
Push
message.removePush
in interface PushService
push
- Push message to persist.@Transactional public void savePush(Push push, List<Device> devices)
PushService
savePush
in interface PushService
push
- Push message to be sent.devices
- Devices the Push message should be sent to.@Transactional public Push findPushById(Long id)
PushService
Push
by its ID.findPushById
in interface PushService
id
- ID of the Push
to find.Push
that has the specified ID.@Transactional public List<Device> findDevicesForPush(Push push)
PushService
Devices
that was linked to a Push
.findDevicesForPush
in interface PushService
push
- Push
to find devices of.Devices
that was linked.@Transactional public List<PushDeviceTuple> findUnsentPushTuples()
PushService
PushDeviceTuple
.findUnsentPushTuples
in interface PushService
PushDeviceTuple
.@Transactional public List<Push> findAllPush()
PushService
Push
messages
that are persisted.findAllPush
in interface PushService
Push
messages.@Transactional public int countPushes()
PushService
Push
messages persisted.countPushes
in interface PushService
Push
messages persisted.public int sendPush(Push push, Device device)
PushService
Push
message to the specified Device
without persisting the message.sendPush
in interface PushService
push
- Push message to send.device
- Device to send the message to.public int sendPush(Push push, List<Device> devices)
PushService
Push
sendPush
in interface PushService
push
- Push message to send.devices
- Devices to send the message to.@Transactional public int sendPush(List<PushDeviceTuple> tuples)
PushService
PushDeviceTuple
sendPush
in interface PushService
tuples
- List of PushDeviceTuple
to send.public void setPushDao(PushDao dao)
PushDao
dao
- Reference to the PushDao
public PushDao getPushDao()
PushDao
public SendServiceDelegator getSendService()
SendServiceDelegator
responsible for delegating
push messages to appropriate implementations for different devices.public void setSendService(SendServiceDelegator sendService)
SendServiceDelegator
for this ServiceImpl.sendService
- public DeviceService getDeviceService()
DeviceService
public void setDeviceService(DeviceService deviceService)
DeviceService
for this ServiceImpl.deviceService
- public PushDeviceTupleService getPdtService()
PushDeviceTupleService
public void setPdtService(PushDeviceTupleService pdtService)
PushDeviceTupleService
for this ServiceImpl.pdtService
- Copyright © 2011-2013 The Kuali Foundation. All Rights Reserved.