public class SourceClient extends java.lang.Object implements AcsEventSubscriber.Callback<ACSJMSMessageEntity>
| Constructor and Description |
|---|
SourceClient(ContainerServices svc) |
| Modifier and Type | Method and Description |
|---|---|
void |
addAlarmListener(SourceListener newListener)
Add a listener for the alarms.
|
void |
close()
Frees all the resources
|
void |
connect()
Connect to the sources NC
|
protected void |
finalize()
Ensure that the resources have been released before destroying the object
|
java.lang.Class<ACSJMSMessageEntity> |
getEventType()
This method is needed for adding event-specific subscriptions
and for the type-safety of this API (based on java generics),
and should be implemented like
|
void |
receive(ACSJMSMessageEntity msg,
EventDescription eventDescrip)
The method receives all the messages published in the NC
For each message received it check if its content is right
i.e.
|
boolean |
removeListener(SourceListener listener)
Remove a listener from the list of listeners to be notified
when a new alarm is received
|
public SourceClient(ContainerServices svc) throws java.lang.Exception
java.lang.Exceptionpublic void connect()
throws java.lang.Exception
java.lang.Exceptionpublic void receive(ACSJMSMessageEntity msg,
EventDescription eventDescrip)
receive in interface AcsEventSubscriber.Callback<ACSJMSMessageEntity>msg - The message received from the NCeventDescrip - Event meta data.alma.acs.nc.Consumerpublic java.lang.Class<ACSJMSMessageEntity> getEventType()
AcsEventSubscriber.Callback
public Class<MyEvent> getEventType() {
return MyEvent.class;
}
getEventType in interface AcsEventSubscriber.Callback<ACSJMSMessageEntity>public void addAlarmListener(SourceListener newListener)
newListener - The listener for alarms from categoriespublic boolean removeListener(SourceListener listener)
listener - The not null listener to removepublic void close()
protected void finalize()
throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.Throwable