com.isti.openorbutil
Class EvtChSupplier

java.lang.Object
  extended by com.isti.openorbutil.EvtChSupplier

public class EvtChSupplier
extends java.lang.Object

Class EvtChSupplier defines a generic Notification Service event channel supplier object that pushes objects out to the event channel.


Field Summary
static org.omg.CosNotification.EventHeader EMPTY_EVENT_HEADER
          An empty event-header object (contents should not be modified).
static org.omg.CosNotification.EventType EMPTY_EVENT_TYPE
          An empty event-type object (contents should not be modified).
static org.omg.CosNotification.FixedEventHeader EMPTY_FIXED_HEADER
          An empty fixed-header object (contents should not be modified).
static org.omg.CosNotification.Property[] EMPTY_PROPERTY_ARRAY
          An empty 'CosNotification' property array.
static java.lang.String NULSTR
          An empty string.
 
Constructor Summary
EvtChSupplier(org.omg.CORBA.ORB orbObj, org.omg.CosNotifyChannelAdmin.EventChannel evtChObj)
          Creates a generic Notification Service event channel supplier object using 'Any' events.
EvtChSupplier(org.omg.CORBA.ORB orbObj, org.omg.CosNotifyChannelAdmin.EventChannel evtChObj, boolean structuredEventsFlag)
          Creates a generic Notification Service event channel supplier object.
EvtChSupplier(org.omg.CORBA.ORB orbObj, java.lang.String serviceName)
          Creates a generic Notification Service event channel supplier object using 'Any' events.
EvtChSupplier(org.omg.CORBA.ORB orbObj, java.lang.String serviceName, boolean structuredEventsFlag)
          Creates a generic Notification Service event channel supplier object.
 
Method Summary
 org.omg.CORBA.Any createAnyStringObj(java.lang.String str)
          Creates an 'Any' object that contains the given string.
static org.omg.CosNotification.FixedEventHeader createFixedEventHeader(org.omg.CosNotification.EventType eventTypeObj, java.lang.String eventNameStr)
          Creates a fixed-header object.
static org.omg.CosNotification.StructuredEvent createStructuredEvent(org.omg.CORBA.Any anyDataObj)
          Creates a structured event object with no event header and no filterable items.
static org.omg.CosNotification.StructuredEvent createStructuredEvent(org.omg.CosNotification.EventHeader eventHeaderObj, org.omg.CORBA.Any anyDataObj)
          Creates a structured event object with no filterable items.
static org.omg.CosNotification.StructuredEvent createStructuredEvent(org.omg.CosNotification.EventHeader eventHeaderObj, org.omg.CosNotification.Property[] filterableItemsArr, org.omg.CORBA.Any anyDataObj)
          Creates a structured event object.
static org.omg.CosNotification.EventHeader createStructuredEventHeader(org.omg.CosNotification.FixedEventHeader fixedEventHeaderObj, org.omg.CosNotification.Property[] variableHeaderArr)
          Creates a structured-event header object.
static org.omg.CosNotification.EventType createStructuredEventType(java.lang.String domainNameStr, java.lang.String typeNameStr)
          Creates a structured-event type object.
 void disconnectImpl()
          Disconnects this object from the event channel.
 org.omg.CosNotifyChannelAdmin.EventChannel getEvtChObj()
          Returns the event channel object used by this object.
 void push(org.omg.CORBA.Any anyObj)
          Pushes an object out to the event channel.
 void push(org.omg.CosNotification.EventHeader eventHeaderObj, org.omg.CosNotification.Property[] filterableItemsArr, org.omg.CORBA.Any anyDataObj)
          Pushes a structured event out to the event channel.
 void push(org.omg.CosNotification.EventType eventTypeObj, java.lang.String eventNameStr, org.omg.CORBA.Any anyDataObj)
          Pushes a structured event out to the event channel.
 void push(java.lang.String str)
          Pushes a String out to the event channel.
 void push(java.lang.String eventNameStr, org.omg.CORBA.Any anyDataObj)
          Pushes a structured event out to the event channel.
 void push(java.lang.String eventNameStr, java.lang.String dataStr)
          Pushes a structured event out to the event channel.
 void push(java.lang.String domainNameStr, java.lang.String typeNameStr, java.lang.String eventNameStr, org.omg.CORBA.Any anyDataObj)
          Pushes a structured event out to the event channel.
 void push(java.lang.String domainNameStr, java.lang.String typeNameStr, java.lang.String eventNameStr, java.lang.String dataStr)
          Pushes a structured event out to the event channel.
 void push(org.omg.CosNotification.StructuredEvent structuredEventObj)
          Pushes a structured event out to the event channel.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NULSTR

public static final java.lang.String NULSTR
An empty string.

See Also:
Constant Field Values

EMPTY_PROPERTY_ARRAY

public static final org.omg.CosNotification.Property[] EMPTY_PROPERTY_ARRAY
An empty 'CosNotification' property array.


EMPTY_EVENT_TYPE

public static final org.omg.CosNotification.EventType EMPTY_EVENT_TYPE
An empty event-type object (contents should not be modified).


EMPTY_FIXED_HEADER

public static final org.omg.CosNotification.FixedEventHeader EMPTY_FIXED_HEADER
An empty fixed-header object (contents should not be modified).


EMPTY_EVENT_HEADER

public static final org.omg.CosNotification.EventHeader EMPTY_EVENT_HEADER
An empty event-header object (contents should not be modified).

Constructor Detail

EvtChSupplier

public EvtChSupplier(org.omg.CORBA.ORB orbObj,
                     org.omg.CosNotifyChannelAdmin.EventChannel evtChObj,
                     boolean structuredEventsFlag)
              throws EvtChSetupException,
                     org.omg.CosEventChannelAdmin.AlreadyConnected,
                     org.omg.CosNotifyChannelAdmin.AdminLimitExceeded
Creates a generic Notification Service event channel supplier object.

Parameters:
orbObj - the CORBA ORB object to be used.
evtChObj - the event channel to use.
structuredEventsFlag - true to use structured events, false to use 'Any' events.
Throws:
EvtChSetupException - if the event channel could not be setup.
org.omg.CosEventChannelAdmin.AlreadyConnected - if the event channel is already connected.
org.omg.CosNotifyChannelAdmin.AdminLimitExceeded - if the supplier admin could not be referenced.

EvtChSupplier

public EvtChSupplier(org.omg.CORBA.ORB orbObj,
                     org.omg.CosNotifyChannelAdmin.EventChannel evtChObj)
              throws EvtChSetupException,
                     org.omg.CosEventChannelAdmin.AlreadyConnected,
                     org.omg.CosNotifyChannelAdmin.AdminLimitExceeded
Creates a generic Notification Service event channel supplier object using 'Any' events.

Parameters:
orbObj - the CORBA ORB object to be used.
evtChObj - the event channel to use.
Throws:
EvtChSetupException - if the event channel could not be setup.
org.omg.CosEventChannelAdmin.AlreadyConnected - if the event channel is already connected.
org.omg.CosNotifyChannelAdmin.AdminLimitExceeded - if the supplier admin could not be referenced.

EvtChSupplier

public EvtChSupplier(org.omg.CORBA.ORB orbObj,
                     java.lang.String serviceName,
                     boolean structuredEventsFlag)
              throws org.omg.CORBA.ORBPackage.InvalidName,
                     EvtChSetupException,
                     org.omg.CosEventChannelAdmin.AlreadyConnected,
                     org.omg.CosNotifyChannelAdmin.AdminLimitExceeded
Creates a generic Notification Service event channel supplier object.

Parameters:
orbObj - the CORBA ORB object to be used.
serviceName - the name bound to the event channel to be used.
structuredEventsFlag - true to use structured events, false to use 'Any' events.
Throws:
org.omg.CORBA.ORBPackage.InvalidName - if the service name could not resolved.
EvtChSetupException - if the event channel could not be setup.
org.omg.CosEventChannelAdmin.AlreadyConnected - if the event channel is already connected.
org.omg.CosNotifyChannelAdmin.AdminLimitExceeded - if the supplier admin could not be referenced.

EvtChSupplier

public EvtChSupplier(org.omg.CORBA.ORB orbObj,
                     java.lang.String serviceName)
              throws org.omg.CORBA.ORBPackage.InvalidName,
                     EvtChSetupException,
                     org.omg.CosEventChannelAdmin.AlreadyConnected,
                     org.omg.CosNotifyChannelAdmin.AdminLimitExceeded
Creates a generic Notification Service event channel supplier object using 'Any' events.

Parameters:
orbObj - the CORBA ORB object to be used.
serviceName - the name bound to the event channel to be used.
Throws:
org.omg.CORBA.ORBPackage.InvalidName - if the service name could not resolved.
EvtChSetupException - if the event channel could not be setup.
org.omg.CosEventChannelAdmin.AlreadyConnected - if the event channel is already connected.
org.omg.CosNotifyChannelAdmin.AdminLimitExceeded - if the supplier admin could not be referenced.
Method Detail

disconnectImpl

public void disconnectImpl()
Disconnects this object from the event channel.


push

public void push(org.omg.CORBA.Any anyObj)
          throws org.omg.CosEventComm.Disconnected
Pushes an object out to the event channel.

Parameters:
anyObj - the object to be pushed.
Throws:
org.omg.CosEventComm.Disconnected - if this object is not connected to the event channel.

push

public void push(java.lang.String str)
          throws org.omg.CosEventComm.Disconnected
Pushes a String out to the event channel.

Parameters:
str - the String object to be send.
Throws:
org.omg.CosEventComm.Disconnected - if this object is not connected to the event channel.

push

public void push(org.omg.CosNotification.StructuredEvent structuredEventObj)
          throws org.omg.CosEventComm.Disconnected,
                 NotStructuredModeException
Pushes a structured event out to the event channel.

Parameters:
structuredEventObj - the structured-event object to use.
Throws:
org.omg.CosEventComm.Disconnected - if this object is not connected to the event channel.
NotStructuredModeException - if this supplier was not created with the 'structuredEventsFlag' parameter set to 'true'.

push

public void push(org.omg.CosNotification.EventHeader eventHeaderObj,
                 org.omg.CosNotification.Property[] filterableItemsArr,
                 org.omg.CORBA.Any anyDataObj)
          throws org.omg.CosEventComm.Disconnected,
                 NotStructuredModeException
Pushes a structured event out to the event channel.

Parameters:
eventHeaderObj - the event header to use, or null for none.
filterableItemsArr - the filterable-items data to use, or null for none.
anyDataObj - the 'Any' data object to use.
Throws:
org.omg.CosEventComm.Disconnected - if this object is not connected to the event channel.
NotStructuredModeException - if this supplier was not created with the 'structuredEventsFlag' parameter set to 'true'.

push

public void push(org.omg.CosNotification.EventType eventTypeObj,
                 java.lang.String eventNameStr,
                 org.omg.CORBA.Any anyDataObj)
          throws org.omg.CosEventComm.Disconnected,
                 NotStructuredModeException
Pushes a structured event out to the event channel.

Parameters:
eventTypeObj - the event-type object to use, or null for none.
eventNameStr - the event name to use, or null for none.
anyDataObj - the 'Any' data object to use.
Throws:
org.omg.CosEventComm.Disconnected - if this object is not connected to the event channel.
NotStructuredModeException - if this supplier was not created with the 'structuredEventsFlag' parameter set to 'true'.

push

public void push(java.lang.String domainNameStr,
                 java.lang.String typeNameStr,
                 java.lang.String eventNameStr,
                 org.omg.CORBA.Any anyDataObj)
          throws org.omg.CosEventComm.Disconnected,
                 NotStructuredModeException
Pushes a structured event out to the event channel.

Parameters:
domainNameStr - the domain name to use, or null for none.
typeNameStr - the type name to use, or null for none.
eventNameStr - the event name to use, or null for none.
anyDataObj - the 'Any' data object to use.
Throws:
org.omg.CosEventComm.Disconnected - if this object is not connected to the event channel.
NotStructuredModeException - if this supplier was not created with the 'structuredEventsFlag' parameter set to 'true'.

push

public void push(java.lang.String domainNameStr,
                 java.lang.String typeNameStr,
                 java.lang.String eventNameStr,
                 java.lang.String dataStr)
          throws org.omg.CosEventComm.Disconnected,
                 NotStructuredModeException
Pushes a structured event out to the event channel.

Parameters:
domainNameStr - the domain name to use, or null for none.
typeNameStr - the type name to use, or null for none.
eventNameStr - the event name to use, or null for none.
dataStr - the string data to be sent.
Throws:
org.omg.CosEventComm.Disconnected - if this object is not connected to the event channel.
NotStructuredModeException - if this supplier was not created with the 'structuredEventsFlag' parameter set to 'true'.

push

public void push(java.lang.String eventNameStr,
                 org.omg.CORBA.Any anyDataObj)
          throws org.omg.CosEventComm.Disconnected,
                 NotStructuredModeException
Pushes a structured event out to the event channel.

Parameters:
eventNameStr - the event name to use, or null for none.
anyDataObj - the 'Any' data object to use.
Throws:
org.omg.CosEventComm.Disconnected - if this object is not connected to the event channel.
NotStructuredModeException - if this supplier was not created with the 'structuredEventsFlag' parameter set to 'true'.

push

public void push(java.lang.String eventNameStr,
                 java.lang.String dataStr)
          throws org.omg.CosEventComm.Disconnected,
                 NotStructuredModeException
Pushes a structured event out to the event channel.

Parameters:
eventNameStr - the event name to use, or null for none.
dataStr - the string data to be sent.
Throws:
org.omg.CosEventComm.Disconnected - if this object is not connected to the event channel.
NotStructuredModeException - if this supplier was not created with the 'structuredEventsFlag' parameter set to 'true'.

getEvtChObj

public org.omg.CosNotifyChannelAdmin.EventChannel getEvtChObj()
Returns the event channel object used by this object.


createAnyStringObj

public org.omg.CORBA.Any createAnyStringObj(java.lang.String str)
Creates an 'Any' object that contains the given string.

Parameters:
str - the string to use.
Returns:
A new 'Any' object.

createStructuredEventType

public static org.omg.CosNotification.EventType createStructuredEventType(java.lang.String domainNameStr,
                                                                          java.lang.String typeNameStr)
Creates a structured-event type object.

Parameters:
domainNameStr - the domain name to use, or null for none.
typeNameStr - the type name to use, or null for none.
Returns:
A new 'EventType' object.

createFixedEventHeader

public static org.omg.CosNotification.FixedEventHeader createFixedEventHeader(org.omg.CosNotification.EventType eventTypeObj,
                                                                              java.lang.String eventNameStr)
Creates a fixed-header object.

Parameters:
eventTypeObj - the event-type object to use, or null for none.
eventNameStr - the event name to use, or null for none.
Returns:
A new 'FixedEventHeader' object.

createStructuredEventHeader

public static org.omg.CosNotification.EventHeader createStructuredEventHeader(org.omg.CosNotification.FixedEventHeader fixedEventHeaderObj,
                                                                              org.omg.CosNotification.Property[] variableHeaderArr)
Creates a structured-event header object.

Parameters:
fixedEventHeaderObj - the fixed-header object to use, or null for none.
variableHeaderArr - the variable-header data to use, or null for none.
Returns:
A new 'EventHeader' object.

createStructuredEvent

public static org.omg.CosNotification.StructuredEvent createStructuredEvent(org.omg.CosNotification.EventHeader eventHeaderObj,
                                                                            org.omg.CosNotification.Property[] filterableItemsArr,
                                                                            org.omg.CORBA.Any anyDataObj)
Creates a structured event object.

Parameters:
eventHeaderObj - the event header to use, or null for none.
filterableItemsArr - the filterable-items data to use, or null for none.
anyDataObj - the 'Any' data object to use.
Returns:
A new 'StructuredEvent' object.

createStructuredEvent

public static org.omg.CosNotification.StructuredEvent createStructuredEvent(org.omg.CosNotification.EventHeader eventHeaderObj,
                                                                            org.omg.CORBA.Any anyDataObj)
Creates a structured event object with no filterable items.

Parameters:
eventHeaderObj - the event header to use, or null for none.
anyDataObj - the 'Any' data object to use.
Returns:
A new 'StructuredEvent' object.

createStructuredEvent

public static org.omg.CosNotification.StructuredEvent createStructuredEvent(org.omg.CORBA.Any anyDataObj)
Creates a structured event object with no event header and no filterable items.

Parameters:
anyDataObj - the 'Any' data object to use.
Returns:
A new 'StructuredEvent' object.