Search in sources :

Example 1 with FixedEventHeader

use of org.omg.CosNotification.FixedEventHeader in project ACS by ACS-Community.

the class StructuredEventCreator method getCORBAEvent.

/**
	 * Method used to create a pre-filled CORBA event.
	 * 
	 * @param typeName
	 *           The structured event's type_name.
	 * @param eventName
	 *           Name of the event.
	 * @return A pre-filled CORBA event.
	 */
private StructuredEvent getCORBAEvent(String typeName, String eventName) {
    // return value
    StructuredEvent event = new StructuredEvent();
    // event.header.fixed_header.event_type
    String channelDomain = alma.acscommon.ALMADOMAIN.value;
    EventType event_type = new EventType(channelDomain, typeName);
    //
    FixedEventHeader fixed_header = new FixedEventHeader(event_type, eventName);
    // event.header.variable_header
    Property[] variable_header = new Property[0];
    // event.header
    event.header = new EventHeader(fixed_header, variable_header);
    return event;
}
Also used : EventType(org.omg.CosNotification.EventType) StructuredEvent(org.omg.CosNotification.StructuredEvent) FixedEventHeader(org.omg.CosNotification.FixedEventHeader) FixedEventHeader(org.omg.CosNotification.FixedEventHeader) EventHeader(org.omg.CosNotification.EventHeader) Property(org.omg.CosNotification.Property)

Example 2 with FixedEventHeader

use of org.omg.CosNotification.FixedEventHeader in project ACS by ACS-Community.

the class NCPublisher method getCORBAEvent.

/**
	 * Method used to create a pre-filled CORBA event.
	 * 
	 * @param typeName
	 *            The structured event's type_name.
	 * @param eventName
	 *            Name of the event.
	 * @return A pre-filled CORBA event.
	 */
protected StructuredEvent getCORBAEvent(String typeName, String eventName) {
    // return value
    StructuredEvent event = new StructuredEvent();
    // event.header.fixed_header.event_type
    String channelDomain = alma.acscommon.ALMADOMAIN.value;
    EventType event_type = new EventType(channelDomain, typeName);
    FixedEventHeader fixed_header = new FixedEventHeader(event_type, eventName);
    // event.header.variable_header
    Property[] variable_header = new Property[0];
    // event.header
    event.header = new EventHeader(fixed_header, variable_header);
    return event;
}
Also used : InvalidEventType(org.omg.CosNotifyComm.InvalidEventType) EventType(org.omg.CosNotification.EventType) StructuredEvent(org.omg.CosNotification.StructuredEvent) FixedEventHeader(org.omg.CosNotification.FixedEventHeader) FixedEventHeader(org.omg.CosNotification.FixedEventHeader) EventHeader(org.omg.CosNotification.EventHeader) Property(org.omg.CosNotification.Property)

Aggregations

EventHeader (org.omg.CosNotification.EventHeader)2 EventType (org.omg.CosNotification.EventType)2 FixedEventHeader (org.omg.CosNotification.FixedEventHeader)2 Property (org.omg.CosNotification.Property)2 StructuredEvent (org.omg.CosNotification.StructuredEvent)2 InvalidEventType (org.omg.CosNotifyComm.InvalidEventType)1