diff options
author | Lars Thorsen <[email protected]> | 2018-04-25 15:09:14 +0200 |
---|---|---|
committer | Lars Thorsen <[email protected]> | 2018-04-27 12:05:30 +0200 |
commit | 6bcdad20c24457393c0d9eeb385d0ff5aa872cd0 (patch) | |
tree | 63162ddfa38d92eaff2193b73277aba18160308c /lib/cosEvent | |
parent | 87b06e4ab91729f7415578c8ac0aacec28720ad9 (diff) | |
download | otp-6bcdad20c24457393c0d9eeb385d0ff5aa872cd0.tar.gz otp-6bcdad20c24457393c0d9eeb385d0ff5aa872cd0.tar.bz2 otp-6bcdad20c24457393c0d9eeb385d0ff5aa872cd0.zip |
Move the corba applcations to separate repository
All corba applications are moved to a separate repository.
E.g. orber, ic, cosEvent, cosEventDomain, cosNotifications
cosTime, cosTransactions, cosProperty and cosFileTransfer.
Diffstat (limited to 'lib/cosEvent')
58 files changed, 0 insertions, 5390 deletions
diff --git a/lib/cosEvent/AUTHORS b/lib/cosEvent/AUTHORS deleted file mode 100644 index 624d275f78..0000000000 --- a/lib/cosEvent/AUTHORS +++ /dev/null @@ -1,5 +0,0 @@ -Original Authors: -Niclas Eklund - -Contributors: - diff --git a/lib/cosEvent/Makefile b/lib/cosEvent/Makefile deleted file mode 100644 index 276b7bd865..0000000000 --- a/lib/cosEvent/Makefile +++ /dev/null @@ -1,42 +0,0 @@ -# -# %CopyrightBegin% -# -# Copyright Ericsson AB 1999-2016. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# %CopyrightEnd% -# -# -include $(ERL_TOP)/make/target.mk -include $(ERL_TOP)/make/$(TARGET)/otp.mk - -# ---------------------------------------------------- -# Application version -# ---------------------------------------------------- -include vsn.mk -VSN=$(COSEVENT_VSN) - -# ---------------------------------------------------- -# Common Macros -# ---------------------------------------------------- - -SUB_DIRECTORIES = src doc/src - -SPECIAL_TARGETS = - -# ---------------------------------------------------- -# Default Subdir Targets -# ---------------------------------------------------- -include $(ERL_TOP)/make/otp_subdir.mk - diff --git a/lib/cosEvent/doc/html/.gitignore b/lib/cosEvent/doc/html/.gitignore deleted file mode 100644 index e69de29bb2..0000000000 --- a/lib/cosEvent/doc/html/.gitignore +++ /dev/null diff --git a/lib/cosEvent/doc/man3/.gitignore b/lib/cosEvent/doc/man3/.gitignore deleted file mode 100644 index e69de29bb2..0000000000 --- a/lib/cosEvent/doc/man3/.gitignore +++ /dev/null diff --git a/lib/cosEvent/doc/man6/.gitignore b/lib/cosEvent/doc/man6/.gitignore deleted file mode 100644 index e69de29bb2..0000000000 --- a/lib/cosEvent/doc/man6/.gitignore +++ /dev/null diff --git a/lib/cosEvent/doc/pdf/.gitignore b/lib/cosEvent/doc/pdf/.gitignore deleted file mode 100644 index e69de29bb2..0000000000 --- a/lib/cosEvent/doc/pdf/.gitignore +++ /dev/null diff --git a/lib/cosEvent/doc/src/CosEventChannelAdmin.xml b/lib/cosEvent/doc/src/CosEventChannelAdmin.xml deleted file mode 100644 index 29336c1878..0000000000 --- a/lib/cosEvent/doc/src/CosEventChannelAdmin.xml +++ /dev/null @@ -1,78 +0,0 @@ -<?xml version="1.0" encoding="utf-8" ?> -<!DOCTYPE erlref SYSTEM "erlref.dtd"> - -<erlref> - <header> - <copyright> - <year>1997</year><year>2016</year> - <holder>Ericsson AB. All Rights Reserved.</holder> - </copyright> - <legalnotice> - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - </legalnotice> - - <title>CosEventChannelAdmin</title> - <prepared></prepared> - <responsible></responsible> - <docno></docno> - <approved></approved> - <checked></checked> - <date>1997-11-13</date> - <rev>PA1</rev> - <file>CosEventChannelAdmin.xml</file> - </header> - <module>CosEventChannelAdmin</module> - <modulesummary>The CosEventChannelAdmin defines a set if event service interfaces that enables decoupled asynchronous communication between objects and implements generic (untyped) version of the OMG COSS standard event service.</modulesummary> - <description> - <p>The event service defines two roles for objects: the supplier role and - the consumer role. Suppliers supply event data to the event channel and - consumers receive event data from the channel. Suppliers do not need to - know the identity of the consumers, and vice versa. Consumers and - suppliers are connected to the event channel via proxies, which are managed - by ConsumerAdmin and SupplierAdmin objects.</p> - <p>There are four general models of communication. These are: </p> - <list type="bulleted"> - <item>The canonical push model. It allows the suppliers of events to initiate the - transfer of event data to consumers. Event channels play the role of - <c><![CDATA[Notifier]]></c>. Active suppliers use event channel to push data to - passive consumers registered with the event channel.</item> - <item>The canonical pull model. It allows consumers to request events from - suppliers. Event channels play the role of <c><![CDATA[Procure]]></c> since they - procure events on behalf of consumers. Active consumers can explicitly - pull data from passive suppliers via the event channels.</item> - <item>The hybrid push/pull model. It allows consumers request events queued at - a channel by suppliers. Event channels play the role of <c><![CDATA[Queue]]></c>. - Active consumers explicitly pull data deposited by active suppliers via - the event channels.</item> - <item>The hybrid pull/push model. It allows the channel to pull events from - suppliers and push them to consumers. Event channels play the role of - <c><![CDATA[Intelligent agent]]></c>. Active event channels can pull data from - passive suppliers to push it to passive consumers.</item> - </list> - <p>To get access to all definitions, e.g., exceptions, - include necessary <c><![CDATA[hrl]]></c> files by using:<br></br><c><![CDATA[-include_lib("cosEvent/include/*.hrl").]]></c></p> - <p>There are seven different interfaces supported in the service:</p> - <list type="bulleted"> - <item>ProxyPushConsumer</item> - <item>ProxyPullSupplier</item> - <item>ProxyPullConsumer</item> - <item>ProxyPushSupplier</item> - <item>ConsumerAdmin</item> - <item>SupplierAdmin</item> - <item>EventChannel</item> - </list> - </description> - -</erlref> - diff --git a/lib/cosEvent/doc/src/CosEventChannelAdmin_ConsumerAdmin.xml b/lib/cosEvent/doc/src/CosEventChannelAdmin_ConsumerAdmin.xml deleted file mode 100644 index 80d36ba5c5..0000000000 --- a/lib/cosEvent/doc/src/CosEventChannelAdmin_ConsumerAdmin.xml +++ /dev/null @@ -1,73 +0,0 @@ -<?xml version="1.0" encoding="utf-8" ?> -<!DOCTYPE erlref SYSTEM "erlref.dtd"> - -<erlref> - <header> - <copyright> - <year>1997</year> - <year>2016</year> - <holder>Ericsson AB, All Rights Reserved</holder> - </copyright> - <legalnotice> - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - The Initial Developer of the Original Code is Ericsson AB. - </legalnotice> - - <title>CosEventChannelAdmin_ConsumerAdmin</title> - <prepared></prepared> - <responsible></responsible> - <docno></docno> - <approved></approved> - <checked></checked> - <date>1997-11-13</date> - <rev>PA1</rev> - <file>CosEventChannelAdmin_ConsumerAdmin.xml</file> - </header> - <module>CosEventChannelAdmin_ConsumerAdmin</module> - <modulesummary>This module implements a ConsumerAdmin interface, which allows consumers to be connected to the event channel.</modulesummary> - <description> - <p>The ConsumerAdmin interface defines the first step for connecting consumers - to the event channel. It acts as a factory for creating proxy suppliers. - Both consumer administration and supplier administration are defined as separate - objects so that the creator of the channel can control the addition of - suppliers and consumers. </p> - <p>To get access to all definitions include necessary <c><![CDATA[hrl]]></c> files by using:<br></br><c><![CDATA[-include_lib("cosEvent/include/*.hrl").]]></c></p> - </description> - <funcs> - <func> - <name>obtain_push_supplier(Object) -> Return</name> - <fsummary>Create a ProxyPushSupplier object</fsummary> - <type> - <v>Object = #objref</v> - <v>Return = #objref</v> - </type> - <desc> - <p>This operation returns a ProxyPushSupplier object reference.</p> - </desc> - </func> - <func> - <name>obtain_pull_supplier(Object) -> Return</name> - <fsummary>Create a ProxyPullSupplier object</fsummary> - <type> - <v>Object = #objref</v> - <v>Return = #objref</v> - </type> - <desc> - <p>This operation returns a ProxyPullSupplier object reference.</p> - </desc> - </func> - </funcs> - -</erlref> - diff --git a/lib/cosEvent/doc/src/CosEventChannelAdmin_EventChannel.xml b/lib/cosEvent/doc/src/CosEventChannelAdmin_EventChannel.xml deleted file mode 100644 index f32e742240..0000000000 --- a/lib/cosEvent/doc/src/CosEventChannelAdmin_EventChannel.xml +++ /dev/null @@ -1,95 +0,0 @@ -<?xml version="1.0" encoding="utf-8" ?> -<!DOCTYPE erlref SYSTEM "erlref.dtd"> - -<erlref> - <header> - <copyright> - <year>1997</year> - <year>2016</year> - <holder>Ericsson AB, All Rights Reserved</holder> - </copyright> - <legalnotice> - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - The Initial Developer of the Original Code is Ericsson AB. - </legalnotice> - - <title>CosEventChannelAdmin_EventChannel</title> - <prepared></prepared> - <responsible></responsible> - <docno></docno> - <approved></approved> - <checked></checked> - <date>1997-11-13</date> - <rev>PA1</rev> - <file>CosEventChannelAdmin_EventChannel.xml</file> - </header> - <module>CosEventChannelAdmin_EventChannel</module> - <modulesummary>This module implements an Event Channel interface, which plays the role of a mediator between consumers and suppliers.</modulesummary> - <description> - <p>An event channel is an object that allows multiple suppliers to communicate - with multiple consumers in a highly decoupled, asynchronous manner. The event - channel is built up incrementally. When an event channel is - created no suppliers or consumers are connected to it. Event Channel can - implement group communication by serving as a replicator, broadcaster, or - multicaster that forward events from one or more suppliers to multiple - consumers.</p> - <p>It is up to the user to decide when an event channel is created and how - references to the event channel are obtained. By representing the event - channel as an object, it has all of the properties that apply to objects. - One way to manage an event channel is to register it in a naming context, - or export it through an operation on an object.</p> - <p>To get access to all definitions include necessary <c><![CDATA[hrl]]></c> files by using:<br></br><c><![CDATA[-include_lib("cosEvent/include/*.hrl").]]></c></p> - <p>Any object that possesses an object reference that supports the ProxyPullConsumer - interface can perform the following operations:</p> - </description> - <funcs> - <func> - <name>for_consumers(Object) -> Return</name> - <fsummary>Return a ConsumerAdmin object</fsummary> - <type> - <v>Object = #objref</v> - <v>Return = #objref</v> - </type> - <desc> - <p>This operation returns a ConsumerAdmin object reference. If ConsumerAdmin - object does not exist already it creates one.</p> - </desc> - </func> - <func> - <name>for_suppliers(Object) -> Return</name> - <fsummary>Return a SupplierAdmin object</fsummary> - <type> - <v>Object = #objref</v> - <v>Return = #objref</v> - </type> - <desc> - <p>This operation returns a SupplierAdmin object reference. If SupplierAdmin - object does not exist already it creates one.</p> - </desc> - </func> - <func> - <name>destroy(Object) -> Return</name> - <fsummary>Destroy the event channel</fsummary> - <type> - <v>Object = #objref</v> - <v>Return = #objref</v> - </type> - <desc> - <p></p> - </desc> - </func> - </funcs> - -</erlref> - diff --git a/lib/cosEvent/doc/src/CosEventChannelAdmin_ProxyPullConsumer.xml b/lib/cosEvent/doc/src/CosEventChannelAdmin_ProxyPullConsumer.xml deleted file mode 100644 index 83bf8acbf2..0000000000 --- a/lib/cosEvent/doc/src/CosEventChannelAdmin_ProxyPullConsumer.xml +++ /dev/null @@ -1,85 +0,0 @@ -<?xml version="1.0" encoding="utf-8" ?> -<!DOCTYPE erlref SYSTEM "erlref.dtd"> - -<erlref> - <header> - <copyright> - <year>1997</year> - <year>2016</year> - <holder>Ericsson AB, All Rights Reserved</holder> - </copyright> - <legalnotice> - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - The Initial Developer of the Original Code is Ericsson AB. - </legalnotice> - - <title>CosEventChannelAdmin_ProxyPullConsumer</title> - <prepared></prepared> - <responsible></responsible> - <docno></docno> - <approved></approved> - <checked></checked> - <date>1997-11-13</date> - <rev>PA1</rev> - <file>CosEventChannelAdmin_ProxyPullConsumer.xml</file> - </header> - <module>CosEventChannelAdmin_ProxyPullConsumer</module> - <modulesummary>This module implements a ProxyPullConsumer interface which acts as a middleman between pull supplier and the event channel.</modulesummary> - <description> - <p>The ProxyPullConsumer interface defines the second step for connecting pull - suppliers to the event channel. A proxy consumer is similar to a normal consumer, - but includes an additional method for connecting a supplier to the proxy - consumer.</p> - <p>To get access to all definitions, e.g., exceptions, - include necessary <c><![CDATA[hrl]]></c> files by using:<br></br><c><![CDATA[-include_lib("cosEvent/include/*.hrl").]]></c></p> - <p>Any object that possesses an object reference that supports the ProxyPullConsumer - interface can perform the following operations:</p> - </description> - <funcs> - <func> - <name>connect_pull_supplier(Object, PullSupplier) -> Return</name> - <fsummary>Connect the pull supplier to the proxy pull consumer</fsummary> - <type> - <v>Object = #objref</v> - <v>PullSupplier = #objref of PullSupplier type</v> - <v>Return = ok | {'EXCEPTION', E}</v> - <v>E = #'CosEventChannelAdmin_AlreadyConnected'{} | #'CosEventChannelAdmin_TypeError'{}</v> - </type> - <desc> - <p>This operation connects PullSupplier object to the ProxyPullConsumer object. - If a nil object reference is passed CORBA standard <c><![CDATA[BAD_PARAM]]></c> exception - is raised. If the ProxyPullConsumer is already connected to a PullSupplier, - then the <c><![CDATA[CosEventChannelAdmin_AlreadyConnected]]></c> exception is raised. - Implementations of ProxyPullConsumers may require additional interface - functionality; if these requirements are not met the - <c><![CDATA[CosEventChannelAdmin_TypeError]]></c> exception will be raised.</p> - </desc> - </func> - <func> - <name>disconnect_pull_consumer(Object) -> Return</name> - <fsummary>Disconnect the ProxyPullConsumer object from the event channel.</fsummary> - <type> - <v>Object = #objref</v> - <v>Return = ok</v> - </type> - <desc> - <p>This operation disconnects proxy pull consumer from the event channel and - sends a notification about the loss of the connection to the pull supplier - attached to it.</p> - </desc> - </func> - </funcs> - -</erlref> - diff --git a/lib/cosEvent/doc/src/CosEventChannelAdmin_ProxyPullSupplier.xml b/lib/cosEvent/doc/src/CosEventChannelAdmin_ProxyPullSupplier.xml deleted file mode 100644 index 0060e71e2b..0000000000 --- a/lib/cosEvent/doc/src/CosEventChannelAdmin_ProxyPullSupplier.xml +++ /dev/null @@ -1,112 +0,0 @@ -<?xml version="1.0" encoding="utf-8" ?> -<!DOCTYPE erlref SYSTEM "erlref.dtd"> - -<erlref> - <header> - <copyright> - <year>1997</year> - <year>2016</year> - <holder>Ericsson AB, All Rights Reserved</holder> - </copyright> - <legalnotice> - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - The Initial Developer of the Original Code is Ericsson AB. - </legalnotice> - - <title>CosEventChannelAdmin_ProxyPullSupplier</title> - <prepared></prepared> - <responsible></responsible> - <docno></docno> - <approved>Lars Thors</approved> - <checked></checked> - <date>1997-11-13</date> - <rev>PA1</rev> - <file>CosEventChannelAdmin_ProxyPullSupplier.xml</file> - </header> - <module>CosEventChannelAdmin_ProxyPullSupplier</module> - <modulesummary>This module implements a ProxyPullSupplier interface which acts as a middleman between pull consumer and the event channel.</modulesummary> - <description> - <p>The ProxyPullSupplier interface defines the second step for connecting pull consumers to the event channel. A proxy supplier is similar to a normal supplier, - but includes an additional method for connecting a consumer to the proxy - supplier.</p> - <p>To get access to all definitions, e.g., exceptions, - include necessary <c><![CDATA[hrl]]></c> files by using:<br></br><c><![CDATA[-include_lib("cosEvent/include/*.hrl").]]></c></p> - <p>Any object that possesses an object reference that supports the ProxyPullSupplier - interface can perform the following operations:</p> - </description> - <funcs> - <func> - <name>connect_pull_consumer(Object, PullConsumer) -> Return</name> - <fsummary>Connect the pull consumer to the proxy pull supplier</fsummary> - <type> - <v>Object = #objref</v> - <v>PullConsumer = #objref of PullConsumer type</v> - <v>Return = ok | {'EXCEPTION', #'CosEventChannelAdmin_AlreadyConnected'{}}</v> - </type> - <desc> - <p>This operation connects PullConsumer object to the ProxyPullSupplier object. - A nil object reference can be passed to this operation. If so a channel - cannot invoke the disconnect_pull_consumer operation on the consumer; - the consumer may be disconnected from the channel without being - informed. If the ProxyPullSupplier is already connected to a - PullConsumer, then the <c><![CDATA[CosEventChannelAdmin_AlreadyConnected]]></c> - exception is raised.</p> - </desc> - </func> - <func> - <name>disconnect_pull_supplier(Object) -> Return</name> - <fsummary>Disconnect the ProxyPullSupplier object from the event channel.</fsummary> - <type> - <v>Object = #objref</v> - <v>Return = ok</v> - </type> - <desc> - <p>This operation disconnects proxy pull supplier from the event channel. - It sends a notification about the loss of the connection to the pull consumer - attached to it, unless nil object reference was passed at the connection - time.</p> - </desc> - </func> - <func> - <name>pull(Object) -> Return</name> - <fsummary>Transmit data from suppliers to consumers.</fsummary> - <type> - <v>Object = #objref</v> - <v>Return = any</v> - </type> - <desc> - <p>This operation blocks until the event data is available or the - <c><![CDATA[CosEventComm_Disconnected]]></c> exception is raised. - It returns the event data to the consumer.</p> - </desc> - </func> - <func> - <name>try_pull(Object) -> Return</name> - <fsummary>Transmit data from suppliers to consumers.</fsummary> - <type> - <v>Object = #objref</v> - <v>Return = {any, bool()}</v> - </type> - <desc> - <p>This operation does not block: if the event data is available, it returns - the event data and sets the data availability flag to true; otherwise - it returns a long with an undefined value and sets the data availability to - false. If the event communication has already been disconnected, the - <c><![CDATA[CosEventComm_Disconnected]]></c> exception is raised.</p> - </desc> - </func> - </funcs> - -</erlref> - diff --git a/lib/cosEvent/doc/src/CosEventChannelAdmin_ProxyPushConsumer.xml b/lib/cosEvent/doc/src/CosEventChannelAdmin_ProxyPushConsumer.xml deleted file mode 100644 index 9f19d001f9..0000000000 --- a/lib/cosEvent/doc/src/CosEventChannelAdmin_ProxyPushConsumer.xml +++ /dev/null @@ -1,99 +0,0 @@ -<?xml version="1.0" encoding="utf-8" ?> -<!DOCTYPE erlref SYSTEM "erlref.dtd"> - -<erlref> - <header> - <copyright> - <year>1997</year> - <year>2016</year> - <holder>Ericsson AB, All Rights Reserved</holder> - </copyright> - <legalnotice> - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - The Initial Developer of the Original Code is Ericsson AB. - </legalnotice> - - <title>CosEventChannelAdmin_ProxyPushConsumer</title> - <prepared></prepared> - <responsible></responsible> - <docno></docno> - <approved></approved> - <checked></checked> - <date>1997-11-13</date> - <rev>PA1</rev> - <file>CosEventChannelAdmin_ProxyPushConsumer.xml</file> - </header> - <module>CosEventChannelAdmin_ProxyPushConsumer</module> - <modulesummary>This module implements a ProxyPushConsumer interface which acts as a middleman between push supplier and the event channel.</modulesummary> - <description> - <p>The ProxyPushConsumer interface defines the second step for connecting push - suppliers to the event channel. A proxy consumer is similar to a normal consumer, - but includes an additional method for connecting a supplier to the proxy - consumer.</p> - <p>To get access to all definitions, e.g., exceptions, - include necessary <c><![CDATA[hrl]]></c> files by using:<br></br><c><![CDATA[-include_lib("cosEvent/include/*.hrl").]]></c></p> - <p>Any object that possesses an object reference that supports the ProxyPushConsumer - interface can perform the following operations:</p> - </description> - <funcs> - <func> - <name>connect_push_supplier(Object, PushSupplier) -> Return</name> - <fsummary>Connect the push supplier to the proxy push consumer</fsummary> - <type> - <v>Object = #objref</v> - <v>PushSupplier = #objref of PushSupplier type</v> - <v>Return = ok | {'EXCEPTION', #'CosEventChannelAdmin_AlreadyConnected'{}}</v> - </type> - <desc> - <p>This operation connects PushSupplier object to the ProxyPushConsumer object. - A nil object reference can be passed to this operation. If so a channel - cannot invoke the disconnect_push_supplier operation on the supplier; - the supplier may be disconnected from the channel without being - informed. If the ProxyPushConsumer is already connected to a - PushSupplier, then the <c><![CDATA[CosEventChannelAdmin_AlreadyConnected]]></c> - exception is raised.</p> - </desc> - </func> - <func> - <name>disconnect_push_consumer(Object) -> Return</name> - <fsummary>Disconnect the ProxyPushConsumer object from the event channel.</fsummary> - <type> - <v>Object = #objref</v> - <v>Return = ok</v> - </type> - <desc> - <p>This operation disconnects proxy push consumer from the event channel. - Sends a notification about the loss of the connection to the push supplier - attached to it, unless nil object reference was passed at the connection - time.</p> - </desc> - </func> - <func> - <name>push(Object, Data) -> Return</name> - <fsummary>Communicate event data to the consumers.</fsummary> - <type> - <v>Object = #objref</v> - <v>Data = any</v> - <v>Return = ok | {'EXCEPTION', #'CosEventComm_Disconnected'{}}</v> - </type> - <desc> - <p>This operation sends event data to all connected consumers via the - event channel. If the event communication has already been disconnected, - the <c><![CDATA[CosEventComm_Disconnected]]></c> is raised.</p> - </desc> - </func> - </funcs> - -</erlref> - diff --git a/lib/cosEvent/doc/src/CosEventChannelAdmin_ProxyPushSupplier.xml b/lib/cosEvent/doc/src/CosEventChannelAdmin_ProxyPushSupplier.xml deleted file mode 100644 index 2b1098b9a7..0000000000 --- a/lib/cosEvent/doc/src/CosEventChannelAdmin_ProxyPushSupplier.xml +++ /dev/null @@ -1,85 +0,0 @@ -<?xml version="1.0" encoding="utf-8" ?> -<!DOCTYPE erlref SYSTEM "erlref.dtd"> - -<erlref> - <header> - <copyright> - <year>1997</year> - <year>2016</year> - <holder>Ericsson AB, All Rights Reserved</holder> - </copyright> - <legalnotice> - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - The Initial Developer of the Original Code is Ericsson AB. - </legalnotice> - - <title>CosEventChannelAdmin_ProxyPushSupplier</title> - <prepared></prepared> - <responsible></responsible> - <docno></docno> - <approved></approved> - <checked></checked> - <date>1997-11-13</date> - <rev>PA1</rev> - <file>CosEventChannelAdmin_ProxyPushSupplier.xml</file> - </header> - <module>CosEventChannelAdmin_ProxyPushSupplier</module> - <modulesummary>This module implements a ProxyPushSupplier interface which acts as a middleman between push consumer and the event channel.</modulesummary> - <description> - <p>The ProxyPushSupplier interface defines the second step for connecting push - consumers to the event channel. A proxy supplier is similar to a normal supplier, - but includes an additional method for connecting a consumer to the proxy - supplier.</p> - <p>To get access to all definitions, e.g., exceptions, - include necessary <c><![CDATA[hrl]]></c> files by using:<br></br><c><![CDATA[-include_lib("cosEvent/include/*.hrl").]]></c></p> - <p>Any object that possesses an object reference that supports the ProxyPushSupplier - interface can perform the following operations:</p> - </description> - <funcs> - <func> - <name>connect_push_consumer(Object, PushConsumer) -> Return</name> - <fsummary>Connect the push consumer to the proxy push supplier</fsummary> - <type> - <v>Object = #objref</v> - <v>PushConsumer = #objref of PushConsumer type</v> - <v>Return = ok | {'EXCEPTION', E}</v> - <v>E = #'CosEventChannelAdmin_AlreadyConnected'{} | #'CosEventChannelAdmin_TypeError'{}</v> - </type> - <desc> - <p>This operation connects PushConsumer object to the ProxyPushSupplier object. - If a nil object reference is passed CORBA standard <c><![CDATA[BAD_PARAM]]></c> exception - is raised. If the ProxyPushSupplier is already connected to a PushConsumer, - then the <c><![CDATA[CosEventChannelAdmin_AlreadyConnected]]></c> exception is raised. - Implementations of ProxyPushSuppliers may require additional interface - functionality; if these requirements are not met the - <c><![CDATA[CosEventChannelAdmin_TypeError]]></c> exception will be raised.</p> - </desc> - </func> - <func> - <name>disconnect_push_supplier(Object) -> Return</name> - <fsummary>Disconnect the ProxyPushSupplier object from the event channel.</fsummary> - <type> - <v>Object = #objref</v> - <v>Return = ok</v> - </type> - <desc> - <p>This operation disconnects proxy push supplier from the event channel and - sends a notification about the loss of the connection to the push consumer - attached to it.</p> - </desc> - </func> - </funcs> - -</erlref> - diff --git a/lib/cosEvent/doc/src/CosEventChannelAdmin_SupplierAdmin.xml b/lib/cosEvent/doc/src/CosEventChannelAdmin_SupplierAdmin.xml deleted file mode 100644 index 2a58c0a873..0000000000 --- a/lib/cosEvent/doc/src/CosEventChannelAdmin_SupplierAdmin.xml +++ /dev/null @@ -1,73 +0,0 @@ -<?xml version="1.0" encoding="utf-8" ?> -<!DOCTYPE erlref SYSTEM "erlref.dtd"> - -<erlref> - <header> - <copyright> - <year>1997</year> - <year>2016</year> - <holder>Ericsson AB, All Rights Reserved</holder> - </copyright> - <legalnotice> - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - The Initial Developer of the Original Code is Ericsson AB. - </legalnotice> - - <title>CosEventChannelAdmin_SupplierAdmin</title> - <prepared></prepared> - <responsible></responsible> - <docno></docno> - <approved></approved> - <checked></checked> - <date>1997-11-13</date> - <rev>PA1</rev> - <file>CosEventChannelAdmin_SupplierAdmin.xml</file> - </header> - <module>CosEventChannelAdmin_SupplierAdmin</module> - <modulesummary>This module implements a SupplierAdmin interface, which allows suppliers to be connected to the event channel.</modulesummary> - <description> - <p>The SupplierAdmin interface defines the first step for connecting suppliers - to the event channel. It acts as a factory for creating proxy consumers. - Both consumer administration and supplier administration are defined as separate - objects so that the creator of the channel can control the addition of - suppliers and consumers.</p> - <p>To get access to all definitions include necessary <c><![CDATA[hrl]]></c> files by using:<br></br><c><![CDATA[-include_lib("cosEvent/include/*.hrl").]]></c></p> - </description> - <funcs> - <func> - <name>obtain_push_consumer(Object) -> Return</name> - <fsummary>Create a ProxyPushConsumer object</fsummary> - <type> - <v>Object = #objref</v> - <v>Return = #objref</v> - </type> - <desc> - <p>This operation returns a ProxyPushConsumer object reference.</p> - </desc> - </func> - <func> - <name>obtain_pull_consumer(Object) -> Return</name> - <fsummary>Create a ProxyPullConsumer object</fsummary> - <type> - <v>Object = #objref</v> - <v>Return = #objref</v> - </type> - <desc> - <p>This operation returns a ProxyPullConsumer object reference.</p> - </desc> - </func> - </funcs> - -</erlref> - diff --git a/lib/cosEvent/doc/src/Makefile b/lib/cosEvent/doc/src/Makefile deleted file mode 100644 index 4fcb210e5a..0000000000 --- a/lib/cosEvent/doc/src/Makefile +++ /dev/null @@ -1,145 +0,0 @@ -# -# %CopyrightBegin% -# -# Copyright Ericsson AB 1999-2017. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# %CopyrightEnd% -# -# -include $(ERL_TOP)/make/target.mk -include $(ERL_TOP)/make/$(TARGET)/otp.mk - -# ---------------------------------------------------- -# Application version -# ---------------------------------------------------- -include ../../vsn.mk -VSN=$(COSEVENT_VSN) -APPLICATION=cosEvent - -# ---------------------------------------------------- -# Release directory specification -# ---------------------------------------------------- -RELSYSDIR = $(RELEASE_PATH)/lib/$(APPLICATION)-$(VSN) - -# ---------------------------------------------------- -# Target Specs -# ---------------------------------------------------- -XML_APPLICATION_FILES = ref_man.xml -XML_REF3_FILES = \ - CosEventChannelAdmin.xml \ - CosEventChannelAdmin_ConsumerAdmin.xml \ - CosEventChannelAdmin_SupplierAdmin.xml \ - CosEventChannelAdmin_EventChannel.xml \ - CosEventChannelAdmin_ProxyPullConsumer.xml \ - CosEventChannelAdmin_ProxyPullSupplier.xml \ - CosEventChannelAdmin_ProxyPushConsumer.xml \ - CosEventChannelAdmin_ProxyPushSupplier.xml \ - cosEventApp.xml - -XML_PART_FILES = \ - part.xml -XML_CHAPTER_FILES = \ - ch_contents.xml \ - ch_introduction.xml \ - ch_event_service.xml \ - notes.xml - -BOOK_FILES = book.xml - -XML_FILES = $(BOOK_FILES) $(XML_APPLICATION_FILES) $(XML_REF3_FILES) \ - $(XML_PART_FILES) $(XML_CHAPTER_FILES) - -TECHNICAL_DESCR_FILES = - -GIF_FILES = \ - e_s_components.gif \ - e_s_models.gif - - -PS_FILES = - - -# ---------------------------------------------------- - -INTERNAL_HTML_FILES = $(TECHNICAL_DESCR_FILES:%.xml=$(HTMLDIR)/%.html) - -HTML_FILES = $(XML_APPLICATION_FILES:%.xml=$(HTMLDIR)/%.html) \ - $(XML_PART_FILES:%.xml=$(HTMLDIR)/%.html) - -INFO_FILE = ../../info -EXTRA_FILES = \ - $(DEFAULT_GIF_FILES) \ - $(DEFAULT_HTML_FILES) \ - $(XML_REF3_FILES:%.xml=$(HTMLDIR)/%.html) \ - $(XML_CHAPTER_FILES:%.xml=$(HTMLDIR)/%.html) - -MAN3_FILES = $(XML_REF3_FILES:%.xml=$(MAN3DIR)/%.3) - -HTML_REF_MAN_FILE = $(HTMLDIR)/index.html - -TOP_PDF_FILE = $(PDFDIR)/$(APPLICATION)-$(VSN).pdf - -# ---------------------------------------------------- -# FLAGS -# ---------------------------------------------------- -XML_FLAGS += -DVIPS_FLAGS += - -# ---------------------------------------------------- -# Targets -# ---------------------------------------------------- -$(HTMLDIR)/%.gif: %.gif - $(INSTALL_DATA) $< $@ - -docs: pdf html man - -$(TOP_PDF_FILE): $(XML_FILES) - -pdf: $(TOP_PDF_FILE) - -html: gifs $(HTML_REF_MAN_FILE) - -clean clean_docs: - rm -rf $(HTMLDIR)/* - rm -f $(MAN3DIR)/* - rm -f $(TOP_PDF_FILE) $(TOP_PDF_FILE:%.pdf=%.fo) - rm -f errs core *~ - rm -f $(JD_HTML) $(JD_PACK) - -man: $(MAN3_FILES) - -gifs: $(GIF_FILES:%=$(HTMLDIR)/%) - -$(INDEX_TARGET): $(INDEX_SRC) - sed -e 's;%VSN%;$(VSN);' $(INDEX_SRC) > $(INDEX_TARGET) - -debug opt: - -# ---------------------------------------------------- -# Release Target -# ---------------------------------------------------- -include $(ERL_TOP)/make/otp_release_targets.mk - -release_docs_spec: docs - $(INSTALL_DIR) "$(RELSYSDIR)/doc/pdf" - $(INSTALL_DATA) $(TOP_PDF_FILE) "$(RELSYSDIR)/doc/pdf" - $(INSTALL_DIR) "$(RELSYSDIR)/doc/html" - $(INSTALL_DATA) $(HTMLDIR)/* \ - "$(RELSYSDIR)/doc/html" - $(INSTALL_DATA) $(INFO_FILE) "$(RELSYSDIR)" - $(INSTALL_DIR) "$(RELEASE_PATH)/man/man3" - $(INSTALL_DATA) $(MAN3DIR)/* "$(RELEASE_PATH)/man/man3" - -release_spec: diff --git a/lib/cosEvent/doc/src/book.xml b/lib/cosEvent/doc/src/book.xml deleted file mode 100644 index 5c0172b4cd..0000000000 --- a/lib/cosEvent/doc/src/book.xml +++ /dev/null @@ -1,50 +0,0 @@ -<?xml version="1.0" encoding="utf-8" ?> -<!DOCTYPE book SYSTEM "book.dtd"> - -<book xmlns:xi="http://www.w3.org/2001/XInclude"> - <header titlestyle="normal"> - <copyright> - <year>1999</year><year>2016</year> - <holder>Ericsson AB. All Rights Reserved.</holder> - </copyright> - <legalnotice> - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - </legalnotice> - - <title>cosEvent</title> - <prepared></prepared> - <docno></docno> - <date>1998-04-25</date> - <rev>1.0</rev> - <file>book.xml</file> - </header> - <insidecover> - </insidecover> - <pagetext>cosEvent</pagetext> - <preamble> - <contents level="2"></contents> - </preamble> - <parts lift="no"> - <xi:include href="part.xml"/> - </parts> - <applications> - <xi:include href="ref_man.xml"/> - </applications> - <releasenotes> - <xi:include href="notes.xml"/> - </releasenotes> - <listofterms></listofterms> - <index></index> -</book> - diff --git a/lib/cosEvent/doc/src/ch_contents.xml b/lib/cosEvent/doc/src/ch_contents.xml deleted file mode 100644 index 07773877ea..0000000000 --- a/lib/cosEvent/doc/src/ch_contents.xml +++ /dev/null @@ -1,71 +0,0 @@ -<?xml version="1.0" encoding="utf-8" ?> -<!DOCTYPE chapter SYSTEM "chapter.dtd"> - -<chapter> - <header> - <copyright> - <year>1999</year> - <year>2016</year> - <holder>Ericsson AB, All Rights Reserved</holder> - </copyright> - <legalnotice> - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - The Initial Developer of the Original Code is Ericsson AB. - </legalnotice> - - <title>The cosEvent Application</title> - <prepared>Niclas Eklund</prepared> - <docno></docno> - <date>1999-09-17</date> - <rev>B</rev> - <file>ch_contents.xml</file> - </header> - - <section> - <title>Content Overview</title> - <p>The cosEvent documentation is divided into three sections: - </p> - <list type="bulleted"> - <item> - <p>PART ONE - The User's Guide - <br></br>Description of the cosEvent Application including - services and a small tutorial demonstrating - the development of a simple service.</p> - </item> - <item> - <p>PART TWO - Release Notes - <br></br>A concise history of cosEvent.</p> - </item> - <item> - <p>PART THREE - The Reference Manual - <br></br> A quick reference guide, including a - brief description, to all the functions available in cosEvent.</p> - </item> - </list> - </section> - - <section> - <title>Brief Description of the User's Guide</title> - <p>The User's Guide contains the following parts:</p> - <list type="bulleted"> - <item> - <p>CosEvent overview</p> - </item> - <item> - <p>CosEvent installation and examples</p> - </item> - </list> - </section> -</chapter> - diff --git a/lib/cosEvent/doc/src/ch_event_service.xml b/lib/cosEvent/doc/src/ch_event_service.xml deleted file mode 100644 index 3a783234af..0000000000 --- a/lib/cosEvent/doc/src/ch_event_service.xml +++ /dev/null @@ -1,222 +0,0 @@ -<?xml version="1.0" encoding="utf-8" ?> -<!DOCTYPE chapter SYSTEM "chapter.dtd"> - -<chapter> - <header> - <copyright> - <year>1997</year><year>2016</year> - <holder>Ericsson AB. All Rights Reserved.</holder> - </copyright> - <legalnotice> - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - </legalnotice> - - <title>Event Service</title> - <prepared></prepared> - <docno></docno> - <date>97-11-19</date> - <rev>A</rev> - <file>ch_es_intro.xml</file> - </header> - - <section> - <title>Overview of the CosEvent Service</title> - <p>The Event service allows programmers to subscribe to - information channels. Suppliers can generate events without knowing the - consumer identities and the consumer can receive events without knowing - the supplier identity. Both push and pull event delivery are supported. - The Event service will queue information and processes. - </p> - <p>The CORBA Event service provides a flexible model for - asynchronous, decoupled communication between objects. This - chapter outlines communication models and the roles and - relationships of key components in the CosEvent service. It - shows a simple example on use of this service.</p> - </section> - - <section> - <title>Event Service Components</title> - <p>There are five components in the OMG CosEvent service architecture. These - are described below:</p> - <marker id="e_s_components"></marker> - <image file="e_s_components.gif"> - <icaption> -Figure 1: Event service Components</icaption> - </image> - <list type="bulleted"> - <item><em>Suppliers and consumers:</em> Consumers are the ultimate targets of - events generated by suppliers. Consumers and suppliers can both play active - and - passive roles. There could be two types of consumers and suppliers: push - or pull. A PushSupplier object can actively push an event to a passive - PushConsumer object. Likewise, a PullSupplier object can passively - wait for a PullConsumer object to actively pull an event from it.</item> - <item><em>EventChannel:</em> The central abstraction in the CosEvent service is the - EventChannel which plays the role of a mediator between consumers and - suppliers. Consumers and suppliers register their interest with the - EventChannel. It can provide many-to-many communication. The channel - consumes events from one or more suppliers, and supplies events to one - or more consumers. An EventChannel can support consumers and suppliers - using different communication models.</item> - <item><em>ProxySuppliers and ProxyConsumers:</em> ProxySuppliers act as middlemen - between consumers and the EventChannel. A ProxySupplier is similar to - a normal supplier, but includes an additional method for connecting a - consumer to the ProxySupplier. Likewise, ProxyConsumers act as - middlemen between suppliers and the EventChannel. A ProxyConsumer is - similar to a normal consumer, but includes an additional method for - connecting a supplier to the ProxyConsumer.</item> - <item><em>Supplier and consumer administrations:</em> Consumer administration acts as - a factory for creating ProxySuppliers. Supplier administration acts as - a factory for creating ProxyConsumers.</item> - </list> - </section> - - <section> - <title>Event Service Communication Models</title> - <p>There are four general models of component collaboration in the OMG CosEvent service - architecture. The following describes these models: - (Please note that proxies are not shown in the diagrams for simplicity).</p> - <marker id="e_s_models"></marker> - <image file="e_s_models.gif"> - <icaption> -Figure 2: Event service Communication Models</icaption> - </image> - <list type="bulleted"> - <item><em>The Canonical Push Model:</em> The Canonical push model shown in figure 2(A) allows - the suppliers of events to initiate the transfer of event data to consumers. - In this model, suppliers are active initiators and consumers are the passive - targets of the requests. EventChannels play the role of <c><![CDATA[Notifier]]></c>. - Thus, active suppliers use EventChannels to push data to passive consumers that - have registered with the EventChannels.</item> - <item><em>The Canonical Pull Model:</em>The Canonical pull model shown - in figure 2(B) - allows consumers to request events from suppliers. In this model, - Consumers are - active initiators and suppliers are the passive targets of the pull - requests. - EventChannel plays the role of <c><![CDATA[Procurer]]></c> since it procures - events - on behalf of consumers. Thus, active consumers can explicitly pull - data - from passive suppliers via the EventChannels.</item> - <item><em>The Hybrid Push/Pull Model:</em> The push/pull model shown in figure 2(C) is a - hybrid that allows consumers to request events queued at an EventChannel - by suppliers. In this model, both suppliers and consumers are active - initiators of the requests. EventChannels play the role of <c><![CDATA[Queue]]></c>. - Thus, active consumers can explicitly pull data deposited by active - suppliers via the EventChannels.</item> - <item><em>The Hybrid Pull/Push Model:</em> The pull/push model shown in figure 2(D) is another - hybrid that allows the channel to pull events from suppliers and push them - to consumers. In this model, suppliers are passive targets of pull requests - and consumers are passive targets of pushes. EventChannels play the role of - <c><![CDATA[Intelligent Agent]]></c>. Thus, active EventChannels can pull data from - passive suppliers and push that data to passive consumers.</item> - </list> - </section> - - <section> - <title>A Tutorial on How to Create a Simple Service</title> - <p>To be able to use the cosEvent application supplier and consumer objects - must be implemented, which must inherit from the appropriate interface - defined in the <em>CosEventComm.idl</em> specification.</p> - <p>We start by creating an interface which inherits from the correct interface, - e.g., CosEventComm::PushConsumer. Hence, we must also implement all - operations defined in the PushConsumer interface. The IDL-file could look like: - </p> - <code type="c"><![CDATA[ -#ifndef _MYCLIENT_IDL -#define _MYCLIENT_IDL -#include <CosEventComm.idl> - -module myClientImpl { - - interface ownInterface:CosEventComm::PushConsumer { - - void ownFunctions(in any NeededArguments) - raises(OwnExceptions); - - }; -}; - -#endif - ]]></code> - <p>Run the IDL compiler on this file by calling the <c><![CDATA[ic:gen/1]]></c> function. - This will produce the API named <c><![CDATA[myClientImpl_ownInterface.erl]]></c>. - After generating the API stubs and the server skeletons it is time to - implement the servers and if no special options are sent - to the IDl compiler the file name is <c><![CDATA[myClientImpl_ownInterface_impl.erl]]></c>.</p> - </section> - - <section> - <title>How to Run Everything</title> - <p>Below is a short transcript on how to run cosEvent. </p> - <code type="none"><![CDATA[ - -%% Start Mnesia and Orber -mnesia:delete_schema([node()]), -mnesia:create_schema([node()]), -orber:install([node()]), -mnesia:start(), -orber:start(), - -%% Install cosEvent in the IFR. -cosEventApp:install(), - -%% Register the application specific Client implementations -%% in the IFR. -'oe_myClientImpl':'oe_register'(), - -%% Start the cosEvent application. -cosEventApp:start(), - -%% Start a channel using the default configuration -Ch = cosEventApp:start_channel(), -%% ... or use configuration parameters. -Ch = cosEventApp:start_channel([{pull_interval, 10}, {maxEvents, 50}]), - -%% Retrieve a SupplierAdmin and a ConsumerAdmin. -AdminSupplier = 'CosEventChannelAdmin_EventChannel':for_suppliers(Ch), -AdminConsumer = 'CosEventChannelAdmin_EventChannel':for_consumers(Ch), - -%% Use the corresponding Admin object to get access to wanted Proxies - -%% Create a Push Consumer Proxy, which the Client Push Supplier will push -%% events to. -ProxyPushConsumer = - 'CosEventChannelAdmin_SupplierAdmin':obtain_push_consumer(AdminSupplier), - -%% Create a Push Supplier Proxy, which will push events to the registered -%% Push Consumer. -ProxyPushSupplier = - 'CosEventChannelAdmin_ConsumerAdmin':obtain_push_supplier(AdminConsumer), - - -%% Create application Clients. We can, for example, start the Clients -%% our selves or look them up in the naming service. This is application -%% specific. -Consumer = myClientImpl_ownInterface:oe_create(), -Supplier = ... - -%% Connect each Client to the corresponding Proxy. -'CosEventChannelAdmin_ProxyPushConsumer': - connect_push_supplier(ProxyPushConsumer, Supplier), -'CosEventChannelAdmin_ProxyPushSupplier': - connect_push_consumer(ProxyPushSupplier, Consumer), - ]]></code> - <p>The example above, exemplifies a event system, i.e., the <em>Canonical Push Model</em>, where the Supplier client in some way generates event - and pushes them to the proxy. The push supplier proxies will eventually - push the events to each Consumer client.</p> - </section> -</chapter> - diff --git a/lib/cosEvent/doc/src/ch_introduction.xml b/lib/cosEvent/doc/src/ch_introduction.xml deleted file mode 100644 index c88e96e40d..0000000000 --- a/lib/cosEvent/doc/src/ch_introduction.xml +++ /dev/null @@ -1,57 +0,0 @@ -<?xml version="1.0" encoding="utf-8" ?> -<!DOCTYPE chapter SYSTEM "chapter.dtd"> - -<chapter> - <header> - <copyright> - <year>1999</year> - <year>2016</year> - <holder>Ericsson AB, All Rights Reserved</holder> - </copyright> - <legalnotice> - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - The Initial Developer of the Original Code is Ericsson AB. - </legalnotice> - - <title>Introduction to cosEvent</title> - <prepared>Niclas Eklund</prepared> - <docno></docno> - <date>1999-09-17</date> - <rev></rev> - <file>ch_introduction.xml</file> - </header> - - <section> - <title>Overview</title> - <p>The cosEvent application is a Event Service compliant with the <url href="http://www.omg.org">OMG</url> - Event Service CosEvent. - </p> - - <section> - <title>Purpose and Dependencies</title> - <p>CosEvent is dependent on <em>Orber</em>, which provides CORBA functionality in an Erlang environment.</p> - </section> - - <section> - <title>Prerequisites</title> - <p>To fully understand the concepts presented in the - documentation, it is recommended that the user is familiar - with distributed programming and CORBA. - </p> - <p>Recommended reading includes <em>CORBA, Fundamentals and Programming - Jon Siegel</em> and <em>Open Telecom Platform Documentation Set</em>. It is also helpful to have read - <em>Concurrent Programming in Erlang</em>.</p> - </section> - </section> -</chapter> - diff --git a/lib/cosEvent/doc/src/cosEventApp.xml b/lib/cosEvent/doc/src/cosEventApp.xml deleted file mode 100644 index d26512e0c3..0000000000 --- a/lib/cosEvent/doc/src/cosEventApp.xml +++ /dev/null @@ -1,169 +0,0 @@ -<?xml version="1.0" encoding="utf-8" ?> -<!DOCTYPE erlref SYSTEM "erlref.dtd"> - -<erlref> - <header> - <copyright> - <year>2001</year> - <year>2016</year> - <holder>Ericsson AB, All Rights Reserved</holder> - </copyright> - <legalnotice> - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - The Initial Developer of the Original Code is Ericsson AB. - </legalnotice> - - <title>cosEventApp</title> - <prepared>Niclas Eklund</prepared> - <responsible>Niclas Eklund</responsible> - <docno></docno> - <approved>Niclas Eklund</approved> - <checked></checked> - <date>2000-01-31</date> - <rev>PA1</rev> - <file>cosEventApp.xml</file> - </header> - <module>cosEventApp</module> - <modulesummary>The main module of the cosEvent application.</modulesummary> - <description> - <p>To get access to the record definitions for the structures use:<br></br><c><![CDATA[-include_lib("cosEvent/include/*.hrl").]]></c></p> - <p>This module contains the functions for starting and stopping the application.</p> - </description> - <funcs> - <func> - <name>install() -> Return</name> - <fsummary>Install the cosEvent application</fsummary> - <type> - <v>Return = ok | {'EXCEPTION', E} | {'EXIT', R}</v> - </type> - <desc> - <p>This operation installs the cosEvent application.</p> - </desc> - </func> - <func> - <name>uninstall() -> Return</name> - <fsummary>Uninstall the cosEvent application</fsummary> - <type> - <v>Return = ok | {'EXCEPTION', E} | {'EXIT', R}</v> - </type> - <desc> - <p>This operation uninstalls the cosEvent application.</p> - </desc> - </func> - <func> - <name>start() -> Return</name> - <fsummary>Start the cosEvent application</fsummary> - <type> - <v>Return = ok | {error, Reason}</v> - </type> - <desc> - <p>This operation starts the cosEvent application.</p> - </desc> - </func> - <func> - <name>stop() -> Return</name> - <fsummary>Stop the cosEvent application</fsummary> - <type> - <v>Return = ok | {error, Reason}</v> - </type> - <desc> - <p>This operation stops the cosEvent application.</p> - </desc> - </func> - <func> - <name>start_channel() -> Channel</name> - <fsummary>Start a channel with default settings</fsummary> - <type> - <v>Channel = #objref</v> - </type> - <desc> - <p>This operation creates a new instance of a - <seealso marker="CosEventChannelAdmin_EventChannel">Event Channel</seealso> - using the default settings.</p> - </desc> - </func> - <func> - <name>start_channel(Options) -> Channel</name> - <fsummary>Start a channel with settings defined by the given options</fsummary> - <type> - <v>Options = [Option]</v> - <v>Option = {pull_interval, Seconds} | {typecheck, Boolean} | {maxEvents, Integer} | {blocking, Boolean}</v> - <v>Channel = #objref</v> - </type> - <desc> - <p>This operation creates a new instance of a - <seealso marker="CosEventChannelAdmin_EventChannel">Event Channel</seealso></p> - <p></p> - <list type="bulleted"> - <item><c><![CDATA[{pull_interval, Seconds}]]></c> - determine how often Proxy Pull - Consumers will check for new events with the client application. The - default value is 20 seconds.</item> - <item><c><![CDATA[{typecheck, Boolean}]]></c> - if this option is set to true the - proxies will check if the supplied client object is of correct type. - The default value is false.</item> - <item><c><![CDATA[{maxEvents, Integer}]]></c> - this option determine how many events - the <c><![CDATA[ProxyPullSuppliers]]></c> will store before discarding events. - If the limit is reached events will be discarded in any order. - The default value is 300.</item> - <item><c><![CDATA[{blocking, Boolean}]]></c> - this option determine the behavior of - the channel when handling events internally. If set to <c><![CDATA[true]]></c> the - risk of a single event supplier floods the system is reduced, but - the performance may also be reduced. - The default value is <c><![CDATA[true]]></c>.</item> - </list> - </desc> - </func> - <func> - <name>start_channel_link() -> Channel</name> - <fsummary>Start a channel, which is linked to the invoking process, with default settings</fsummary> - <type> - <v>Channel = #objref</v> - </type> - <desc> - <p>This operation creates a new instance of a - <seealso marker="CosEventChannelAdmin_EventChannel">Event Channel</seealso>, - which is linked to the invoking process, using the default settings.</p> - </desc> - </func> - <func> - <name>start_channel_link(Options) -> Channel</name> - <fsummary>Start a channel, which is linked to the invoking process, with settings defined by the given options</fsummary> - <type> - <v>Options = [Option]</v> - <v>Option = {pull_interval, Seconds} | {typecheck, Boolean} | {maxEvents, Integer} | {blocking, Boolean}</v> - <v>Channel = #objref</v> - </type> - <desc> - <p>This operation creates a new instance of a - <seealso marker="CosEventChannelAdmin_EventChannel">Event Channel</seealso>, - which is linked to the invoking process, with settings defined by the - given options. Allowed options are the same as for - <c><![CDATA[cosEventApp:start_channel/1]]></c>.</p> - </desc> - </func> - <func> - <name>stop_channel(Channel) -> Reply</name> - <fsummary>Terminate the target object</fsummary> - <type> - <v>Channel = #objref</v> - <v>Reply = ok | {'EXCEPTION', E}</v> - </type> - <desc> - <p>This operation stop the target event channel.</p> - </desc> - </func> - </funcs> - -</erlref> - diff --git a/lib/cosEvent/doc/src/e_s_components.gif b/lib/cosEvent/doc/src/e_s_components.gif Binary files differdeleted file mode 100644 index a448c14ce0..0000000000 --- a/lib/cosEvent/doc/src/e_s_components.gif +++ /dev/null diff --git a/lib/cosEvent/doc/src/e_s_models.gif b/lib/cosEvent/doc/src/e_s_models.gif Binary files differdeleted file mode 100644 index 329b0858d1..0000000000 --- a/lib/cosEvent/doc/src/e_s_models.gif +++ /dev/null diff --git a/lib/cosEvent/doc/src/notes.xml b/lib/cosEvent/doc/src/notes.xml deleted file mode 100644 index ba0b0d88db..0000000000 --- a/lib/cosEvent/doc/src/notes.xml +++ /dev/null @@ -1,348 +0,0 @@ -<?xml version="1.0" encoding="utf-8" ?> -<!DOCTYPE chapter SYSTEM "chapter.dtd"> - -<chapter> - <header> - <copyright> - <year>1999</year><year>2016</year> - <holder>Ericsson AB. All Rights Reserved.</holder> - </copyright> - <legalnotice> - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - </legalnotice> - - <title>cosEvent Release Notes</title> - <prepared></prepared> - <responsible></responsible> - <docno></docno> - <approved></approved> - <checked></checked> - <date>99-02-12</date> - <rev>A</rev> - <file>notes.xml</file> - </header> - - <section><title>cosEvent 2.2.2</title> - - <section><title>Fixed Bugs and Malfunctions</title> - <list> - <item> - <p> Removed all old unused files in the documentation. - </p> - <p> - Own Id: OTP-14475 Aux Id: ERL-409, PR-1493 </p> - </item> - </list> - </section> - -</section> - -<section><title>cosEvent 2.2.1</title> - - <section><title>Improvements and New Features</title> - <list> - <item> - <p> - Internal changes</p> - <p> - Own Id: OTP-13551</p> - </item> - </list> - </section> - -</section> - -<section><title>cosEvent 2.2</title> - - <section><title>Improvements and New Features</title> - <list> - <item> - <p> Remove the usage of erlang:now() from all Corba - applications and use the new rand module instead of - random. </p> - <p> - Own Id: OTP-12687</p> - </item> - </list> - </section> - -</section> - -<section><title>cosEvent 2.1.15</title> - - <section><title>Improvements and New Features</title> - <list> - <item> - <p> The default encoding of Erlang files has been changed - from ISO-8859-1 to UTF-8. </p> <p> The encoding of XML - files has also been changed to UTF-8. </p> - <p> - Own Id: OTP-10907</p> - </item> - </list> - </section> - -</section> - -<section><title>cosEvent 2.1.14</title> - - <section><title>Improvements and New Features</title> - <list> - <item> - <p> Postscript files no longer needed for the generation - of PDF files have been removed. </p> - <p> - Own Id: OTP-11016</p> - </item> - </list> - </section> - -</section> - -<section><title>cosEvent 2.1.13</title> - - <section><title>Improvements and New Features</title> - <list> - <item> - <p> - Misc build updates</p> - <p> - Own Id: OTP-10784</p> - </item> - </list> - </section> - -</section> - -<section><title>cosEvent 2.1.12</title> - - <section><title>Improvements and New Features</title> - <list> - <item> - <p>Erlang/OTP can now be built using parallel make if you - limit the number of jobs, for instance using '<c>make - -j6</c>' or '<c>make -j10</c>'. '<c>make -j</c>' does not - work at the moment because of some missing - dependencies.</p> - <p> - Own Id: OTP-9451</p> - </item> - </list> - </section> - -</section> - -<section> - <title>cosEvent 2.1.11</title> - - <section> - <title>Improvements and New Features</title> - <list type="bulleted"> - <item> - <p> - Removed superfluous usage of shy in the documentation since it can cause problem if - a buggy tool is used.</p> - <p> - Own Id: OTP-9319 Aux Id:</p> - </item> - </list> - </section> - </section> - - <section> - <title>cosEvent 2.1.10</title> - - <section> - <title>Improvements and New Features</title> - <list type="bulleted"> - <item> - <p> - Eliminated Dialyzer warnings when using exit or throw.</p> - <p> - Own Id: OTP-9050 Aux Id:</p> - </item> - </list> - </section> - </section> - - <section> - <title>cosEvent 2.1.9</title> - - <section> - <title>Improvements and New Features</title> - <list type="bulleted"> - <item> - <p> - Test suites published.</p> - <p> - Own Id: OTP-8543 Aux Id:</p> - </item> - </list> - </section> - </section> - - <section> - <title>cosEvent 2.1.8</title> - - <section> - <title>Improvements and New Features</title> - <list type="bulleted"> - <item> - <p> - Removed the usage of the codeinclude tag in the documentation.</p> - <p> - Own Id: OTP-8409 Aux Id:</p> - </item> - </list> - </section> - </section> - - <section> - <title>cosEvent 2.1.7</title> - - <section> - <title>Improvements and New Features</title> - <list type="bulleted"> - <item> - <p> - The documentation is now built with open source tools (xsltproc and fop) - that exists on most platforms. One visible change is that the frames are removed.</p> - <p> - Own Id: OTP-8201 Aux Id:</p> - </item> - </list> - </section> - </section> - - <section> - <title>cosEvent 2.1.6</title> - - <section> - <title>Improvements and New Features</title> - <list type="bulleted"> - <item> - <p>Obsolete guards, e.g. record vs is_record, has been changed - to avoid compiler warnings.</p> - <p>Own id: OTP-7987</p> - </item> - </list> - </section> - </section> - - <section> - <title>cosEvent 2.1.5</title> - - <section> - <title>Improvements and New Features</title> - <list type="bulleted"> - <item> - <p>Updated file headers.</p> - <p>Own id: OTP-7837</p> - </item> - </list> - </section> - </section> - - <section> - <title>cosEvent 2.1.4</title> - - <section> - <title>Improvements and New Features</title> - <list type="bulleted"> - <item> - <p>Documentation source included in open source releases.</p> - <p>Own id: OTP-7595</p> - </item> - </list> - </section> - </section> - - <section> - <title>cosEvent 2.1.3</title> - - <section> - <title>Improvements and New Features</title> - <list type="bulleted"> - <item> - <p>Updated file headers.</p> - <p>Own id: OTP-7011</p> - </item> - </list> - </section> - </section> - - <section> - <title>cosEvent 2.1.2</title> - - <section> - <title>Improvements and New Features</title> - <list type="bulleted"> - <item> - <p>The documentation source has been converted from SGML to XML.</p> - <p>Own id: OTP-6754</p> - </item> - </list> - </section> - </section> - - <section> - <title>cosEvent 2.1.1</title> - - <section> - <title>Improvements and New Features</title> - <list type="bulleted"> - <item> - <p>Minor Makefile changes.</p> - <p>Own id: OTP-6701</p> - </item> - </list> - </section> - </section> - - <section> - <title>cosEvent 2.1</title> - - <section> - <title>Improvements and New Features</title> - <list type="bulleted"> - <item> - <p>The stub/skeleton-files generated by IC have been improved, - i.e., depending on the IDL-files, reduced the size of the - erl- and beam-files and decreased dependencies off Orber's - Interface Repository. It is necessary to re-compile all IDL-files - and use COS-applications, including Orber, compiled with - IC-4.2.</p> - <p>Own id: OTP-4576</p> - </item> - </list> - </section> - </section> - - <section> - <title>cosEvent 2.0</title> - - <section> - <title>Fixed Bugs and Malfunctions</title> - <list type="bulleted"> - <item> - <p>This version is a completely new version of the cosEvent - application; older versions was <em>not</em> compliant with the OMG - specification. The <c><![CDATA[look and feel]]></c> have been changed - to be more uniform with the other COS-services.</p> - </item> - </list> - </section> - </section> -</chapter> - diff --git a/lib/cosEvent/doc/src/part.xml b/lib/cosEvent/doc/src/part.xml deleted file mode 100644 index 5e32455ebb..0000000000 --- a/lib/cosEvent/doc/src/part.xml +++ /dev/null @@ -1,40 +0,0 @@ -<?xml version="1.0" encoding="utf-8" ?> -<!DOCTYPE part SYSTEM "part.dtd"> - -<part xmlns:xi="http://www.w3.org/2001/XInclude"> - <header> - <copyright> - <year>1999</year><year>2016</year> - <holder>Ericsson AB. All Rights Reserved.</holder> - </copyright> - <legalnotice> - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - </legalnotice> - - <title>cosEvent User's Guide</title> - <prepared></prepared> - <docno></docno> - <date>1998-04-26</date> - <rev>1.0</rev> - <file>part.xml</file> - </header> - <description> - <p>The <em>cosEvent</em> application is an Erlang implementation of a - CORBA Service CosEvent.</p> - </description> - <xi:include href="ch_contents.xml"/> - <xi:include href="ch_introduction.xml"/> - <xi:include href="ch_event_service.xml"/> -</part> - diff --git a/lib/cosEvent/doc/src/ref_man.xml b/lib/cosEvent/doc/src/ref_man.xml deleted file mode 100644 index 5db5626478..0000000000 --- a/lib/cosEvent/doc/src/ref_man.xml +++ /dev/null @@ -1,46 +0,0 @@ -<?xml version="1.0" encoding="utf-8" ?> -<!DOCTYPE application SYSTEM "application.dtd"> - -<application xmlns:xi="http://www.w3.org/2001/XInclude"> - <header> - <copyright> - <year>1999</year><year>2016</year> - <holder>Ericsson AB. All Rights Reserved.</holder> - </copyright> - <legalnotice> - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - </legalnotice> - - <title>cosEvent Reference Manual</title> - <prepared></prepared> - <docno></docno> - <date>1998-05-05</date> - <rev>2.0</rev> - <file>ref_man.xml</file> - </header> - <description> - <p>The <em>cosEvent</em> application is an Erlang implementation of - a CORBA Service CosEvent.</p> - </description> - <xi:include href="cosEventApp.xml"/> - <xi:include href="CosEventChannelAdmin.xml"/> - <xi:include href="CosEventChannelAdmin_ConsumerAdmin.xml"/> - <xi:include href="CosEventChannelAdmin_SupplierAdmin.xml"/> - <xi:include href="CosEventChannelAdmin_EventChannel.xml"/> - <xi:include href="CosEventChannelAdmin_ProxyPullConsumer.xml"/> - <xi:include href="CosEventChannelAdmin_ProxyPushConsumer.xml"/> - <xi:include href="CosEventChannelAdmin_ProxyPullSupplier.xml"/> - <xi:include href="CosEventChannelAdmin_ProxyPushSupplier.xml"/> -</application> - diff --git a/lib/cosEvent/ebin/.gitignore b/lib/cosEvent/ebin/.gitignore deleted file mode 100644 index e69de29bb2..0000000000 --- a/lib/cosEvent/ebin/.gitignore +++ /dev/null diff --git a/lib/cosEvent/example/.gitignore b/lib/cosEvent/example/.gitignore deleted file mode 100644 index e69de29bb2..0000000000 --- a/lib/cosEvent/example/.gitignore +++ /dev/null diff --git a/lib/cosEvent/include/.gitignore b/lib/cosEvent/include/.gitignore deleted file mode 100644 index e69de29bb2..0000000000 --- a/lib/cosEvent/include/.gitignore +++ /dev/null diff --git a/lib/cosEvent/info b/lib/cosEvent/info deleted file mode 100644 index dc9f7b7404..0000000000 --- a/lib/cosEvent/info +++ /dev/null @@ -1,2 +0,0 @@ -group: orb -short: Orber OMG Event Service diff --git a/lib/cosEvent/src/CosEventChannelAdmin.cfg b/lib/cosEvent/src/CosEventChannelAdmin.cfg deleted file mode 100644 index 0de579bd6f..0000000000 --- a/lib/cosEvent/src/CosEventChannelAdmin.cfg +++ /dev/null @@ -1,6 +0,0 @@ -{this, "CosEventChannelAdmin::SupplierAdmin"}. -{{handle_info, "CosEventChannelAdmin::SupplierAdmin"}, true}. -{this, "CosEventChannelAdmin::ProxyPushConsumer"}. -{{handle_info, "CosEventChannelAdmin::ProxyPushConsumer"}, true}. -{this, "CosEventChannelAdmin::ProxyPullConsumer"}. -{{handle_info, "CosEventChannelAdmin::ProxyPullConsumer"}, true}. diff --git a/lib/cosEvent/src/CosEventChannelAdmin.idl b/lib/cosEvent/src/CosEventChannelAdmin.idl deleted file mode 100644 index d5cb92c4e0..0000000000 --- a/lib/cosEvent/src/CosEventChannelAdmin.idl +++ /dev/null @@ -1,66 +0,0 @@ -#ifndef _COSEVENTCHANELADMIN_IDL -#define _COSEVENTCHANELADMIN_IDL - -#include "CosEventComm.idl" - -#pragma prefix "omg.org" - -module CosEventChannelAdmin -{ - exception AlreadyConnected{}; - exception TypeError{}; - - interface ProxyPushConsumer: CosEventComm::PushConsumer - { - void connect_push_supplier(in CosEventComm:: - PushSupplier push_supplier) - raises (AlreadyConnected); - }; - - interface ProxyPullSupplier: CosEventComm::PullSupplier - { - void connect_pull_consumer(in CosEventComm:: - PullConsumer pull_consumer) - raises (AlreadyConnected); - }; - - interface ProxyPullConsumer: CosEventComm::PullConsumer - { - void connect_pull_supplier(in CosEventComm:: - PullSupplier pull_supplier) - raises (AlreadyConnected, TypeError); - }; - - interface ProxyPushSupplier: CosEventComm::PushSupplier - { - void connect_push_consumer(in CosEventComm:: - PushConsumer push_consumer) - raises (AlreadyConnected, TypeError); - }; - - interface ConsumerAdmin - { - ProxyPushSupplier obtain_push_supplier(); - ProxyPullSupplier obtain_pull_supplier(); - }; - - interface SupplierAdmin - { - ProxyPushConsumer obtain_push_consumer(); - ProxyPullConsumer obtain_pull_consumer(); - }; - - interface EventChannel - { - ConsumerAdmin for_consumers(); - SupplierAdmin for_suppliers(); - void destroy(); - }; - -}; - -#endif - - - - diff --git a/lib/cosEvent/src/CosEventChannelAdmin_ProxyPullConsumer_impl.erl b/lib/cosEvent/src/CosEventChannelAdmin_ProxyPullConsumer_impl.erl deleted file mode 100644 index cb9bb4f4a4..0000000000 --- a/lib/cosEvent/src/CosEventChannelAdmin_ProxyPullConsumer_impl.erl +++ /dev/null @@ -1,206 +0,0 @@ -%%-------------------------------------------------------------------- -%% -%% %CopyrightBegin% -%% -%% Copyright Ericsson AB 2001-2016. All Rights Reserved. -%% -%% Licensed under the Apache License, Version 2.0 (the "License"); -%% you may not use this file except in compliance with the License. -%% You may obtain a copy of the License at -%% -%% http://www.apache.org/licenses/LICENSE-2.0 -%% -%% Unless required by applicable law or agreed to in writing, software -%% distributed under the License is distributed on an "AS IS" BASIS, -%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -%% See the License for the specific language governing permissions and -%% limitations under the License. -%% -%% %CopyrightEnd% -%% -%% -%%---------------------------------------------------------------------- -%% File : CosEventChannelAdmin_ProxyPullConsumer_impl.erl -%% Description : -%% -%%---------------------------------------------------------------------- --module('CosEventChannelAdmin_ProxyPullConsumer_impl'). - -%%---------------------------------------------------------------------- -%% Include files -%%---------------------------------------------------------------------- --include("CosEventChannelAdmin.hrl"). --include("CosEventComm.hrl"). --include("cosEventApp.hrl"). - -%%---------------------------------------------------------------------- -%% External exports -%%---------------------------------------------------------------------- -%% Mandatory --export([init/1, - terminate/2, - code_change/3, - handle_info/2]). - -%% Interface functions --export([connect_pull_supplier/3]). - -%% Exports from "CosEventComm::PullConsumer" --export([disconnect_pull_consumer/2]). - - -%%---------------------------------------------------------------------- -%% Internal exports -%%---------------------------------------------------------------------- - -%%---------------------------------------------------------------------- -%% Records -%%---------------------------------------------------------------------- --record(state, {admin, admin_pid, channel, client, - typecheck, pull_interval, timer_ref}). - -%%---------------------------------------------------------------------- -%% Macros -%%---------------------------------------------------------------------- - -%%====================================================================== -%% External functions -%%====================================================================== -%%---------------------------------------------------------------------- -%% Function : init/1 -%% Returns : {ok, State} | -%% {ok, State, Timeout} | -%% ignore | -%% {stop, Reason} -%% Description: Initiates the server -%%---------------------------------------------------------------------- -init([Admin, AdminPid, Channel, TypeCheck, PullInterval]) -> - process_flag(trap_exit, true), - Secs = timer:seconds(PullInterval), - timer:start(), - {ok, #state{admin = Admin, admin_pid = AdminPid, channel = Channel, - typecheck = TypeCheck, pull_interval = Secs}}. - -%%---------------------------------------------------------------------- -%% Function : terminate/2 -%% Returns : any (ignored by gen_server) -%% Description: Shutdown the server -%%---------------------------------------------------------------------- -terminate(_Reason, #state{client = undefined}) -> - ?DBG("Terminating ~p; no client connected.~n", [_Reason]), - ok; -terminate(_Reason, #state{client = Client} = State) -> - stop_timer(State), - ?DBG("Terminating ~p~n", [_Reason]), - cosEventApp:disconnect('CosEventComm_PullSupplier', - disconnect_pull_supplier, Client), - ok. - -%%---------------------------------------------------------------------- -%% Function : code_change/3 -%% Returns : {ok, NewState} -%% Description: Convert process state when code is changed -%%---------------------------------------------------------------------- -code_change(_OldVsn, State, _Extra) -> - {ok, State}. - -%%---------------------------------------------------------------------% -%% function : handle_info -%% Arguments: -%% Returns : {noreply, State} | -%% {stop, Reason, State} -%% Effect : If the Parent Admin or the Channel terminates so must this object. -%%---------------------------------------------------------------------- -handle_info({'EXIT', Pid, Reason}, #state{admin_pid = Pid} = State) -> - ?DBG("Parent Admin terminated ~p~n", [Reason]), - orber:dbg("[~p] CosEventChannelAdmin_ProxyPullConsumer:handle_info(~p);~n" - "My Admin terminated and so will I.", [?LINE, Reason], ?DEBUG_LEVEL), - {stop, Reason, State}; -handle_info(try_pull_event, State) -> - try_pull_event(State); -handle_info(_Info, State) -> - ?DBG("Unknown Info ~p~n", [_Info]), - {noreply, State}. - -%%---------------------------------------------------------------------- -%% Function : connect_pull_supplier -%% Arguments : -%% Returns : -%% Description: -%%---------------------------------------------------------------------- -connect_pull_supplier(_OE_This, #state{client = undefined, - typecheck = TypeCheck} = State, NewClient) -> - case corba_object:is_nil(NewClient) of - true -> - ?DBG("A NIL client supplied.~n", []), - orber:dbg("[~p] CosEventChannelAdmin_ProxyPullConsumer:connect_pull_supplier(..);~n" - "Supplied a NIL reference which is not allowed.", - [?LINE], ?DEBUG_LEVEL), - corba:raise(#'BAD_PARAM'{completion_status = ?COMPLETED_NO}); - false -> - cosEventApp:type_check(NewClient, 'CosEventComm_PullSupplier', TypeCheck), - NewState = start_timer(State), - {reply, ok, NewState#state{client = NewClient}} - end; -connect_pull_supplier(_, _, _) -> - corba:raise(#'CosEventChannelAdmin_AlreadyConnected'{}). - - -%%---------------------------------------------------------------------- -%% Function : disconnect_pull_consumer -%% Arguments : -%% Returns : -%% Description: -%%---------------------------------------------------------------------- -disconnect_pull_consumer(_OE_This, State) -> - NewState = stop_timer(State), - ?DBG("Disconnect invoked ~p~n", [NewState]), - {stop, normal, ok, NewState#state{client = undefined}}. - -%%====================================================================== -%% Internal functions -%%====================================================================== -%% Start timer which send a message each time we should pull for new events. -start_timer(State) -> - case catch timer:send_interval(State#state.pull_interval, try_pull_event) of - {ok,PullTRef} -> - ?DBG("Started timer: ~p~n", [State#state.pull_interval]), - State#state{timer_ref = PullTRef}; - _ -> - corba:raise(#'INTERNAL'{completion_status=?COMPLETED_NO}) - end. -stop_timer(#state{timer_ref = undefined} = State) -> - ?DBG("No timer to stop~n",[]), - State; -stop_timer(State) -> - ?DBG("Stopped timer~n",[]), - timer:cancel(State#state.timer_ref), - State#state{timer_ref = undefined}. - - -try_pull_event(State) -> - case catch 'CosEventComm_PullSupplier':try_pull(State#state.client) of - {_,false} -> - ?DBG("Client did not supply event~n", []), - {noreply, State}; - {Any, true} -> - 'oe_CosEventComm_Channel':send_sync(State#state.channel, Any), - ?DBG("Received Event ~p and forwarded it successfully.~n", [Any]), - {noreply, State}; - {'EXCEPTION', #'CosEventComm_Disconnected'{}} -> - ?DBG("Client claims we are disconnectedwhen trying to pull event.~n", []), - orber:dbg("[~p] CosEventChannelAdmin_ProxyPullConsumer:try_pull_event();~n" - "Client claims we are disconnected when trying to pull event so I terminate.", - [?LINE], ?DEBUG_LEVEL), - {stop, normal, State#state{client = undefined}}; - What -> - orber:dbg("[~p] CosEventChannelAdmin_ProxyPullConsumer:try_pull_event(~p);~n" - "My Client behaves badly so I terminate.", - [?LINE, What], ?DEBUG_LEVEL), - {stop, normal, State} - end. - - -%%====================================================================== -%% END OF MODULE -%%====================================================================== diff --git a/lib/cosEvent/src/CosEventChannelAdmin_ProxyPushConsumer_impl.erl b/lib/cosEvent/src/CosEventChannelAdmin_ProxyPushConsumer_impl.erl deleted file mode 100644 index 4c2b8629f2..0000000000 --- a/lib/cosEvent/src/CosEventChannelAdmin_ProxyPushConsumer_impl.erl +++ /dev/null @@ -1,170 +0,0 @@ -%%-------------------------------------------------------------------- -%% -%% %CopyrightBegin% -%% -%% Copyright Ericsson AB 2001-2016. All Rights Reserved. -%% -%% Licensed under the Apache License, Version 2.0 (the "License"); -%% you may not use this file except in compliance with the License. -%% You may obtain a copy of the License at -%% -%% http://www.apache.org/licenses/LICENSE-2.0 -%% -%% Unless required by applicable law or agreed to in writing, software -%% distributed under the License is distributed on an "AS IS" BASIS, -%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -%% See the License for the specific language governing permissions and -%% limitations under the License. -%% -%% %CopyrightEnd% -%% -%% -%%---------------------------------------------------------------------- -%% File : CosEventChannelAdmin_ProxyPushConsumer_impl.erl -%% Description : -%% -%%---------------------------------------------------------------------- --module('CosEventChannelAdmin_ProxyPushConsumer_impl'). - -%%---------------------------------------------------------------------- -%% Include files -%%---------------------------------------------------------------------- --include("CosEventChannelAdmin.hrl"). --include("CosEventComm.hrl"). --include("cosEventApp.hrl"). - -%%---------------------------------------------------------------------- -%% External exports -%%---------------------------------------------------------------------- -%% Mandatory --export([init/1, - terminate/2, - code_change/3, - handle_info/2]). - -%% Exports from "CosEventChannelAdmin::ProxyPushConsumer" --export([connect_push_supplier/3]). - -%% Exports from "CosEventComm::PushConsumer" --export([push/3, - disconnect_push_consumer/2]). - -%%---------------------------------------------------------------------- -%% Internal exports -%%---------------------------------------------------------------------- - -%%---------------------------------------------------------------------- -%% Records -%%---------------------------------------------------------------------- --record(state, {admin, admin_pid, channel, client, typecheck}). - -%%---------------------------------------------------------------------- -%% Macros -%%---------------------------------------------------------------------- - -%%====================================================================== -%% External functions -%%====================================================================== -%%---------------------------------------------------------------------- -%% Function : init/1 -%% Returns : {ok, State} | -%% {ok, State, Timeout} | -%% ignore | -%% {stop, Reason} -%% Description: Initiates the server -%%---------------------------------------------------------------------- -init([Admin, AdminPid, Channel, TypeCheck]) -> - process_flag(trap_exit, true), - {ok, #state{admin = Admin, admin_pid = AdminPid, channel = Channel, - typecheck = TypeCheck}}. - -%%---------------------------------------------------------------------- -%% Function : terminate/2 -%% Returns : any (ignored by gen_server) -%% Description: Shutdown the server -%%---------------------------------------------------------------------- -terminate(_Reason, #state{client = undefined}) -> - ?DBG("Terminating ~p; no client connected.~n", [_Reason]), - ok; -terminate(_Reason, #state{client = Client} = _State) -> - ?DBG("Terminating ~p~n", [_Reason]), - cosEventApp:disconnect('CosEventComm_PushSupplier', - disconnect_push_supplier, Client), - ok. - -%%---------------------------------------------------------------------- -%% Function : code_change/3 -%% Returns : {ok, NewState} -%% Description: Convert process state when code is changed -%%---------------------------------------------------------------------- -code_change(_OldVsn, State, _Extra) -> - {ok, State}. - -%%---------------------------------------------------------------------% -%% function : handle_info -%% Arguments: -%% Returns : {noreply, State} | -%% {stop, Reason, State} -%% Effect : If the Parnet Admin or the Channel terminates so must this object. -%%---------------------------------------------------------------------- -handle_info({'EXIT', Pid, Reason}, #state{admin_pid = Pid} = State) -> - ?DBG("Parent Admin terminated ~p~n", [Reason]), - orber:dbg("[~p] CosEventChannelAdmin_ProxyPushConsumer:handle_info(~p);~n" - "My Admin terminated and so will I.", - [?LINE, Reason], ?DEBUG_LEVEL), - {stop, Reason, State}; -handle_info(_Info, State) -> - ?DBG("Unknown Info ~p~n", [_Info]), - {noreply, State}. - -%%---------------------------------------------------------------------- -%% Function : connect_push_supplier -%% Arguments : -%% Returns : -%% Description: -%%---------------------------------------------------------------------- -connect_push_supplier(_OE_This, #state{client = undefined, - typecheck = TypeCheck} = State, NewClient) -> - case corba_object:is_nil(NewClient) of - true -> - ?DBG("A NIL client supplied.~n", []), - {reply, ok, State}; - false -> - cosEventApp:type_check(NewClient, 'CosEventComm_PushSupplier', TypeCheck), - ?DBG("Connected to client.~n", []), - {reply, ok, State#state{client = NewClient}} - end; -connect_push_supplier(_, _, _) -> - corba:raise(#'CosEventChannelAdmin_AlreadyConnected'{}). - - -%%---------------------------------------------------------------------- -%% Function : push -%% Arguments : -%% Returns : -%% Description: -%%---------------------------------------------------------------------- -push(_OE_This, State, Any) -> - %% We should not use corba:reply here since if we block incoming - %% events this will prevent producers to flood the system. - ?DBG("Received Event ~p and forwarded it successfully.~n", [Any]), - 'oe_CosEventComm_Channel':send_sync(State#state.channel, Any), - {reply, ok, State}. - -%%---------------------------------------------------------------------- -%% Function : disconnect_push_consumer -%% Arguments : -%% Returns : -%% Description: -%%---------------------------------------------------------------------- -disconnect_push_consumer(_OE_This, State) -> - ?DBG("Disconnect invoked ~p~n", [State]), - {stop, normal, ok, State#state{client = undefined}}. - -%%====================================================================== -%% Internal functions -%%====================================================================== - -%%====================================================================== -%% END OF MODULE -%%====================================================================== diff --git a/lib/cosEvent/src/CosEventChannelAdmin_SupplierAdmin_impl.erl b/lib/cosEvent/src/CosEventChannelAdmin_SupplierAdmin_impl.erl deleted file mode 100644 index fb5304292b..0000000000 --- a/lib/cosEvent/src/CosEventChannelAdmin_SupplierAdmin_impl.erl +++ /dev/null @@ -1,160 +0,0 @@ -%%-------------------------------------------------------------------- -%% -%% %CopyrightBegin% -%% -%% Copyright Ericsson AB 1997-2016. All Rights Reserved. -%% -%% Licensed under the Apache License, Version 2.0 (the "License"); -%% you may not use this file except in compliance with the License. -%% You may obtain a copy of the License at -%% -%% http://www.apache.org/licenses/LICENSE-2.0 -%% -%% Unless required by applicable law or agreed to in writing, software -%% distributed under the License is distributed on an "AS IS" BASIS, -%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -%% See the License for the specific language governing permissions and -%% limitations under the License. -%% -%% %CopyrightEnd% -%% -%% -%%---------------------------------------------------------------------- -%% File : CosEventChannelAdmin_SupplierAdmin_impl.erl -%% Created : 21 Mar 2001 -%% Description : -%% -%%---------------------------------------------------------------------- --module('CosEventChannelAdmin_SupplierAdmin_impl'). - - -%%---------------------------------------------------------------------- -%% Include files -%%---------------------------------------------------------------------- --include("cosEventApp.hrl"). - - -%%---------------------------------------------------------------------- -%% External exports -%%---------------------------------------------------------------------- -%% Mandatory --export([init/1, - terminate/2, - code_change/3, - handle_info/2]). - -%% Exports from "CosEventChannelAdmin::SupplierAdmin" --export([obtain_push_consumer/2, - obtain_pull_consumer/2]). - -%%---------------------------------------------------------------------- -%% Internal exports -%%---------------------------------------------------------------------- - -%%---------------------------------------------------------------------- -%% Records -%%---------------------------------------------------------------------- --record(state, {channel, channel_pid, typecheck, pull_interval, server_options}). - -%%---------------------------------------------------------------------- -%% Macros -%%---------------------------------------------------------------------- - -%%====================================================================== -%% External functions -%%====================================================================== -%%---------------------------------------------------------------------- -%% Function : init/1 -%% Returns : {ok, State} | -%% {ok, State, Timeout} | -%% ignore | -%% {stop, Reason} -%% Description: Initiates the server -%%---------------------------------------------------------------------- -init([Channel, ChannelPid, TypeCheck, PullInterval, ServerOpts]) -> - process_flag(trap_exit, true), - {ok, #state{channel = Channel, channel_pid = ChannelPid, typecheck = TypeCheck, - pull_interval = PullInterval, server_options = ServerOpts}}. - -%%---------------------------------------------------------------------- -%% Function : terminate/2 -%% Returns : any (ignored by gen_server) -%% Description: Shutdown the server -%%---------------------------------------------------------------------- -terminate(_Reason, _State) -> - ?DBG("Terminating ~p~n", [_Reason]), - ok. - -%%---------------------------------------------------------------------- -%% Function : code_change/3 -%% Returns : {ok, NewState} -%% Description: Convert process state when code is changed -%%---------------------------------------------------------------------- -code_change(_OldVsn, State, _Extra) -> - {ok, State}. - -%%---------------------------------------------------------------------% -%% function : handle_info -%% Arguments: -%% Returns : {noreply, State} | -%% {stop, Reason, State} -%% Effect : Functions demanded by the gen_server module. -%%---------------------------------------------------------------------- -handle_info({'EXIT', Pid, Reason}, #state{channel_pid = Pid} = State) -> - ?DBG("Parent Channel terminated ~p~n", [Reason]), - orber:dbg("[~p] CosEventChannelAdmin_SupplierAdmin:handle_info(~p);~n" - "My Channel terminated and so will I.", - [?LINE, Reason], ?DEBUG_LEVEL), - {stop, Reason, State}; -handle_info(_Info, State) -> - ?DBG("Unknown Info ~p~n", [_Info]), - {noreply, State}. - - -%%---------------------------------------------------------------------- -%% Function : obtain_push_consumer -%% Arguments : -%% Returns : -%% Description: -%%---------------------------------------------------------------------- -obtain_push_consumer(OE_This, #state{channel = Channel, - channel_pid = _ChannelPid, - typecheck = TypeCheck, - server_options = ServerOpts} = State) -> - ?DBG("Starting a new CosEventChannelAdmin_ProxyPushConsumer.~n", []), - {reply, - 'CosEventChannelAdmin_ProxyPushConsumer':oe_create_link([OE_This, - self(), - Channel, - TypeCheck], - ServerOpts), - State}. - -%%---------------------------------------------------------------------- -%% Function : obtain_pull_consumer -%% Arguments : -%% Returns : -%% Description: -%%---------------------------------------------------------------------- -obtain_pull_consumer(OE_This, #state{channel = Channel, - channel_pid = _ChannelPid, - typecheck = TypeCheck, - pull_interval= PullInterval, - server_options = ServerOpts} = State) -> - ?DBG("Starting a new CosEventChannelAdmin_ProxyPullConsumer.~n", []), - {reply, - 'CosEventChannelAdmin_ProxyPullConsumer':oe_create_link([OE_This, - self(), - Channel, - TypeCheck, - PullInterval], - ServerOpts), - State}. - -%%====================================================================== -%% Internal functions -%%====================================================================== - -%%====================================================================== -%% END OF MODULE -%%====================================================================== diff --git a/lib/cosEvent/src/CosEventComm.idl b/lib/cosEvent/src/CosEventComm.idl deleted file mode 100644 index bb0c107394..0000000000 --- a/lib/cosEvent/src/CosEventComm.idl +++ /dev/null @@ -1,37 +0,0 @@ - -#ifndef _COSEVENTCOMM_IDL -#define _COSEVENTCOMM_IDL - -#pragma prefix "omg.org" - -module CosEventComm -{ - exception Disconnected{}; - - interface PushConsumer - { - void push(in any data) raises (Disconnected); - void disconnect_push_consumer(); - }; - - - interface PushSupplier - { - void disconnect_push_supplier(); - }; - - interface PullSupplier - { - any pull() raises(Disconnected); - any try_pull(out boolean has_event) raises(Disconnected); - void disconnect_pull_supplier(); - }; - - interface PullConsumer - { - void disconnect_pull_consumer(); - }; -}; - -#endif - diff --git a/lib/cosEvent/src/Makefile b/lib/cosEvent/src/Makefile deleted file mode 100644 index 29d6223005..0000000000 --- a/lib/cosEvent/src/Makefile +++ /dev/null @@ -1,217 +0,0 @@ -# -# %CopyrightBegin% -# -# Copyright Ericsson AB 1997-2016. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# %CopyrightEnd% -# -# -include $(ERL_TOP)/make/target.mk -ifeq ($(TYPE),debug) -ERL_COMPILE_FLAGS += -Ddebug -W -endif -EBIN=../ebin -include $(ERL_TOP)/make/$(TARGET)/otp.mk - -# ---------------------------------------------------- -# Application version -# ---------------------------------------------------- -include ../vsn.mk -VSN=$(COSEVENT_VSN) - -# ---------------------------------------------------- -# Release directory specification -# ---------------------------------------------------- -RELSYSDIR = $(RELEASE_PATH)/lib/cosEvent-$(VSN) -# ---------------------------------------------------- -# Target Specs -# ---------------------------------------------------- - -MODULES = \ - CosEventChannelAdmin_ProxyPullConsumer_impl \ - CosEventChannelAdmin_ProxyPushConsumer_impl \ - CosEventChannelAdmin_SupplierAdmin_impl \ - oe_CosEventComm_CAdmin_impl \ - oe_CosEventComm_Channel_impl \ - oe_CosEventComm_PullerS_impl \ - oe_CosEventComm_PusherS_impl \ - cosEventApp - - - -ERL_FILES = $(MODULES:%=%.erl) -HRL_FILES = cosEventApp.hrl - - -GEN_ERL_FILES1 = \ - oe_CosEventChannelAdmin.erl \ - CosEventChannelAdmin_ConsumerAdmin.erl \ - CosEventChannelAdmin_EventChannel.erl \ - CosEventChannelAdmin_ProxyPullConsumer.erl \ - CosEventChannelAdmin_ProxyPullSupplier.erl \ - CosEventChannelAdmin_ProxyPushConsumer.erl \ - CosEventChannelAdmin_ProxyPushSupplier.erl \ - CosEventChannelAdmin_SupplierAdmin.erl \ - CosEventChannelAdmin_AlreadyConnected.erl \ - CosEventChannelAdmin_TypeError.erl - -GEN_ERL_FILES2 = \ - oe_CosEventComm_CAdmin.erl \ - oe_CosEventComm_Channel.erl \ - oe_CosEventComm_Event.erl \ - oe_CosEventComm_PullerS.erl \ - oe_CosEventComm_PusherS.erl \ - oe_cosEventApp.erl - -GEN_ERL_FILES3 = \ - oe_CosEventComm.erl \ - CosEventComm_Disconnected.erl \ - CosEventComm_PullConsumer.erl \ - CosEventComm_PullSupplier.erl \ - CosEventComm_PushConsumer.erl \ - CosEventComm_PushSupplier.erl - -GEN_ERL_FILES = \ - $(GEN_ERL_FILES1) $(GEN_ERL_FILES2) $(GEN_ERL_FILES3) - -EXTERNAL_INC_PATH = ../include - -GEN_HRL_FILES1 = \ - oe_CosEventChannelAdmin.hrl \ - CosEventChannelAdmin.hrl \ - CosEventChannelAdmin_ConsumerAdmin.hrl \ - CosEventChannelAdmin_EventChannel.hrl \ - CosEventChannelAdmin_ProxyPullConsumer.hrl \ - CosEventChannelAdmin_ProxyPullSupplier.hrl \ - CosEventChannelAdmin_ProxyPushConsumer.hrl \ - CosEventChannelAdmin_ProxyPushSupplier.hrl \ - CosEventChannelAdmin_SupplierAdmin.hrl - -EXTERNAL_GEN_HRL_FILES1 = $(GEN_HRL_FILES1:%=$(EXTERNAL_INC_PATH)/%) - -GEN_HRL_FILES2 = \ - oe_CosEventComm_PullerS.hrl \ - oe_CosEventComm_CAdmin.hrl \ - oe_CosEventComm_PusherS.hrl \ - oe_CosEventComm_Channel.hrl \ - oe_cosEventApp.hrl \ - oe_CosEventComm_Event.hrl - -GEN_HRL_FILES3 = \ - oe_CosEventComm.hrl \ - CosEventComm.hrl \ - CosEventComm_PullConsumer.hrl \ - CosEventComm_PullSupplier.hrl \ - CosEventComm_PushConsumer.hrl \ - CosEventComm_PushSupplier.hrl - -EXTERNAL_GEN_HRL_FILES3 = $(GEN_HRL_FILES3:%=$(EXTERNAL_INC_PATH)/%) - -GEN_HRL_FILES = \ - $(EXTERNAL_GEN_HRL_FILES1) $(GEN_HRL_FILES2) $(EXTERNAL_GEN_HRL_FILES3) - -TARGET_FILES = \ - $(GEN_ERL_FILES:%.erl=$(EBIN)/%.$(EMULATOR)) \ - $(MODULES:%=$(EBIN)/%.$(EMULATOR)) - -GEN_FILES = $(GEN_HRL_FILES) $(GEN_ERL_FILES) - -IDL_FILES = \ - CosEventChannelAdmin.idl \ - CosEventComm.idl \ - cosEventApp.idl - -APPUP_FILE = cosEvent.appup -APPUP_SRC = $(APPUP_FILE).src -APPUP_TARGET = $(EBIN)/$(APPUP_FILE) - -APP_FILE = cosEvent.app -APP_SRC = $(APP_FILE).src -APP_TARGET = $(EBIN)/$(APP_FILE) - -# ---------------------------------------------------- -# FLAGS -# ---------------------------------------------------- -ERL_IDL_FLAGS += -pa $(ERL_TOP)/lib/cosEvent/ebin -pa $(ERL_TOP)/lib/ic/ebin -# The -pa option is just used temporary until erlc can handle -# includes from other directories than ../include . -ERL_COMPILE_FLAGS += \ - $(ERL_IDL_FLAGS) \ - -I$(ERL_TOP)/lib/orber/include \ - -I$(ERL_TOP)/lib/cosEvent/include \ - +'{parse_transform,sys_pre_attributes}' \ - +'{attribute,insert,app_vsn,"cosEvent_$(COSEVENT_VSN)"}' - -YRL_FLAGS = - -# ---------------------------------------------------- -# Targets -# ---------------------------------------------------- -opt: $(TARGET_FILES) $(APP_TARGET) $(APPUP_TARGET) - -debug: - @${MAKE} TYPE=debug opt - -clean: - rm -f $(TARGET_FILES) $(GEN_FILES) $(APP_TARGET) $(APPUP_TARGET) IDL-GENERATED - rm -f errs core *~ - -$(APP_TARGET): $(APP_SRC) - $(vsn_verbose)sed -e 's;%VSN%;$(VSN);' $(APP_SRC) > $(APP_TARGET) -$(APPUP_TARGET): $(APPUP_SRC) - $(vsn_verbose)sed -e 's;%VSN%;$(VSN);' $(APPUP_SRC) > $(APPUP_TARGET) - -docs: - -# ---------------------------------------------------- -# Special Build Targets -# ---------------------------------------------------- - -IDL-GENERATED: CosEventChannelAdmin.idl cosEventApp.idl CosEventComm.idl - $(gen_verbose)erlc $(ERL_IDL_FLAGS) +'{cfgfile,"CosEventChannelAdmin.cfg"}' CosEventChannelAdmin.idl - $(V_at)mv $(GEN_HRL_FILES1) $(EXTERNAL_INC_PATH) - $(V_at)erlc $(ERL_IDL_FLAGS) +'{cfgfile,"cosEventApp.cfg"}' cosEventApp.idl - $(V_at)erlc $(ERL_IDL_FLAGS) CosEventComm.idl - $(V_at)mv $(GEN_HRL_FILES3) $(EXTERNAL_INC_PATH) - $(V_at)>IDL-GENERATED - -$(GEN_FILES): IDL-GENERATED - -$(TARGET_FILES): IDL-GENERATED - -# ---------------------------------------------------- -# Release Target -# ---------------------------------------------------- -include $(ERL_TOP)/make/otp_release_targets.mk - - -release_spec: opt - $(INSTALL_DIR) "$(RELSYSDIR)" - $(INSTALL_DATA) ../info "$(RELSYSDIR)" - $(INSTALL_DIR) "$(RELSYSDIR)/ebin" - $(INSTALL_DATA) $(TARGET_FILES) $(APP_TARGET) $(APPUP_TARGET) "$(RELSYSDIR)/ebin" - $(INSTALL_DIR) "$(RELSYSDIR)/src" - $(INSTALL_DATA) $(ERL_FILES) $(HRL_FILES) $(GEN_ERL_FILES) $(IDL_FILES) "$(RELSYSDIR)/src" - $(INSTALL_DIR) "$(RELSYSDIR)/include" - $(INSTALL_DATA) $(GEN_HRL_FILES) "$(RELSYSDIR)/include" - - -release_docs_spec: - - - - - - diff --git a/lib/cosEvent/src/cosEvent.app.src b/lib/cosEvent/src/cosEvent.app.src deleted file mode 100644 index 5ffd12bc6b..0000000000 --- a/lib/cosEvent/src/cosEvent.app.src +++ /dev/null @@ -1,46 +0,0 @@ -{application, cosEvent, - [{description, "The Erlang CosEvent application"}, - {vsn, "%VSN%"}, - {modules, - [ - 'CosEventChannelAdmin_ProxyPullConsumer_impl', - 'CosEventChannelAdmin_ProxyPushConsumer_impl', - 'CosEventChannelAdmin_SupplierAdmin_impl', - 'oe_CosEventComm_CAdmin_impl', - 'oe_CosEventComm_Channel_impl', - 'oe_CosEventComm_PullerS_impl', - 'oe_CosEventComm_PusherS_impl', - 'cosEventApp', - 'oe_CosEventChannelAdmin', - 'CosEventChannelAdmin_AlreadyConnected', - 'CosEventChannelAdmin_ConsumerAdmin', - 'CosEventChannelAdmin_EventChannel', - 'CosEventChannelAdmin_ProxyPullConsumer', - 'CosEventChannelAdmin_ProxyPullSupplier', - 'CosEventChannelAdmin_ProxyPushConsumer', - 'CosEventChannelAdmin_ProxyPushSupplier', - 'CosEventChannelAdmin_SupplierAdmin', - 'CosEventChannelAdmin_TypeError', - 'oe_CosEventComm_CAdmin', - 'oe_CosEventComm_Channel', - 'oe_CosEventComm_Event', - 'oe_CosEventComm_PullerS', - 'oe_CosEventComm_PusherS', - 'oe_cosEventApp', - 'oe_CosEventComm', - 'CosEventComm_PushSupplier', - 'CosEventComm_PushConsumer', - 'CosEventComm_PullSupplier', - 'CosEventComm_PullConsumer', - 'CosEventComm_Disconnected' - ] - }, - {registered, []}, - {applications, [orber, stdlib, kernel]}, - {env, []}, - {mod, {cosEventApp, []}}, - {runtime_dependencies, ["stdlib-2.0","orber-3.6.27","kernel-3.0","erts-7.0"]} -]}. - - - diff --git a/lib/cosEvent/src/cosEvent.appup.src b/lib/cosEvent/src/cosEvent.appup.src deleted file mode 100644 index d69b2ef20c..0000000000 --- a/lib/cosEvent/src/cosEvent.appup.src +++ /dev/null @@ -1,6 +0,0 @@ -{"%VSN%", - [ - ], - [ - ] -} diff --git a/lib/cosEvent/src/cosEventApp.cfg b/lib/cosEvent/src/cosEventApp.cfg deleted file mode 100644 index bbacd134f7..0000000000 --- a/lib/cosEvent/src/cosEventApp.cfg +++ /dev/null @@ -1,15 +0,0 @@ -{this, "oe_CosEventComm::Event"}. -{from, "oe_CosEventComm::Event"}. -{{handle_info, "oe_CosEventComm::Event"}, true}. -{this, "oe_CosEventComm::Channel"}. -{from, "oe_CosEventComm::Channel"}. -{{handle_info, "oe_CosEventComm::Channel"}, true}. -{this, "oe_CosEventComm::CAdmin"}. -{from, "oe_CosEventComm::CAdmin"}. -{{handle_info, "oe_CosEventComm::CAdmin"}, true}. -{this, "oe_CosEventComm::PullerS"}. -{from, "oe_CosEventComm::PullerS"}. -{{handle_info, "oe_CosEventComm::PullerS"}, true}. -{this, "oe_CosEventComm::PusherS"}. -{from, "oe_CosEventComm::PusherS"}. -{{handle_info, "oe_CosEventComm::PusherS"}, true}. diff --git a/lib/cosEvent/src/cosEventApp.erl b/lib/cosEvent/src/cosEventApp.erl deleted file mode 100644 index b3c38cef0e..0000000000 --- a/lib/cosEvent/src/cosEventApp.erl +++ /dev/null @@ -1,301 +0,0 @@ -%%-------------------------------------------------------------------- -%% -%% %CopyrightBegin% -%% -%% Copyright Ericsson AB 2001-2016. All Rights Reserved. -%% -%% Licensed under the Apache License, Version 2.0 (the "License"); -%% you may not use this file except in compliance with the License. -%% You may obtain a copy of the License at -%% -%% http://www.apache.org/licenses/LICENSE-2.0 -%% -%% Unless required by applicable law or agreed to in writing, software -%% distributed under the License is distributed on an "AS IS" BASIS, -%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -%% See the License for the specific language governing permissions and -%% limitations under the License. -%% -%% %CopyrightEnd% -%% -%% -%%---------------------------------------------------------------------- -%% File : cosEventApp.erl -%% Description : -%% -%%---------------------------------------------------------------------- --module(cosEventApp). - -%%--------------- INCLUDES ----------------------------------- --include_lib("orber/include/corba.hrl"). --include("cosEventApp.hrl"). - - -%%--------------- EXPORTS------------------------------------- -%% cosEvent API external --export([start/0, stop/0, install/0, uninstall/0, start_channel/0, start_channel/1, - start_channel_link/0, start_channel_link/1, stop_channel/1]). - -%% cosEvent API internal --export([create_link/3, get_option/2, type_check/3, disconnect/3, do_disconnect/3]). - -%% Application callbacks --export([start/2, init/1, stop/1]). - -%%--------------- DEFINES ------------------------------------ --define(IDL_MODULES, ['oe_CosEventComm', - 'oe_CosEventChannelAdmin', - 'oe_cosEventApp']). - --define(SUPERVISOR_NAME, oe_cosEventSup). --define(SUP_FLAG, {simple_one_for_one,50,10}). - --define(SUP_SPEC(Name, Args), - ['CosEventChannel_EventChannel',Args, - [{sup_child, true}, {regname, {global, Name}}]]). --define(SUP_CHILD, - {"oe_EventChild", - {cosEventApp,create_link, []}, - transient,100000,worker, - ['CosEventChannel_EventChannel']}). - - -%%-----------------------------------------------------------% -%% function : install -%% Arguments: - -%% Returns : ok | EXIT | EXCEPTION -%% Effect : Install necessary data in the IFR DB -%%------------------------------------------------------------ -install() -> - case install_loop(?IDL_MODULES, []) of - ok -> - ok; - {error, Reason} -> - exit(Reason) - end. - -install_loop([], _) -> - ok; -install_loop([H|T], Accum) -> - case catch H:'oe_register'() of - {'EXIT',{unregistered,App}} -> - ?write_ErrorMsg("Unable to register '~p'; application ~p not registered.\n" - "Trying to unregister ~p~n", [H,App,Accum]), - uninstall_loop(Accum, {exit, register}); - {'EXCEPTION',_} -> - ?write_ErrorMsg("Unable to register '~p'; propably already registered.\n" - "You are adviced to confirm this.\n" - "Trying to unregister ~p~n", [H,Accum]), - uninstall_loop(Accum, {exit, register}); - ok -> - install_loop(T, [H|Accum]); - _ -> - ?write_ErrorMsg("Unable to register '~p'; reason unknown.\n" - "Trying to unregister ~p~n", [H,Accum]), - uninstall_loop(Accum, {exit, register}) - end. - -%%-----------------------------------------------------------% -%% function : uninstall -%% Arguments: - -%% Returns : ok | EXIT | EXCEPTION -%% Effect : Remove data related to cosEvent from the IFR DB -%%------------------------------------------------------------ -uninstall() -> - case uninstall_loop(lists:reverse(?IDL_MODULES), ok) of - ok -> - ok; - {error, Reason} -> - exit(Reason) - end. - -uninstall_loop([],ok) -> - ok; -uninstall_loop([],{exit, register}) -> - {error, {?MODULE, "oe_register failed"}}; -uninstall_loop([],{exit, unregister}) -> - {error, {?MODULE, "oe_unregister failed"}}; -uninstall_loop([],{exit, both}) -> - {error, {?MODULE, "oe_register and, for some of those already registered, oe_unregister failed"}}; -uninstall_loop([H|T], Status) -> - case catch H:'oe_unregister'() of - ok -> - uninstall_loop(T, Status); - _ when Status == ok -> - ?write_ErrorMsg("Unable to unregister '~p'; propably already unregistered.\n" - "You are adviced to confirm this.\n",[H]), - uninstall_loop(T, {exit, unregister}); - _ -> - ?write_ErrorMsg("Unable to unregister '~p'; propably already unregistered.\n" - "You are adviced to confirm this.\n",[H]), - uninstall_loop(T, {exit, both}) - end. - -%%-----------------------------------------------------------% -%% function : start/stop -%% Arguments: -%% Returns : -%% Effect : Starts or stops the cosTime application. -%%------------------------------------------------------------ - -start() -> - application:start(cosEvent). -stop() -> - application:stop(cosEvent). - -%%-----------------------------------------------------------% -%% function : start -%% Arguments: Type - see module application -%% Arg - see module application -%% Returns : -%% Effect : Module callback for application -%%------------------------------------------------------------ - -start(_, _) -> - supervisor:start_link({local, ?SUPERVISOR_NAME}, cosEventApp, app_init). - - -%%-----------------------------------------------------------% -%% function : stop -%% Arguments: Arg - see module application -%% Returns : -%% Effect : Module callback for application -%%------------------------------------------------------------ - -stop(_) -> - ok. - -%%-----------------------------------------------------------% -%% function : start_channel -%% Arguments: - -%% Returns : -%% Effect : -%%------------------------------------------------------------ -start_channel() -> - start_channel(?DEFAULT_OPTIONS). - -start_channel(Options) when is_list(Options) -> - ServerOpts = get_option(?SERVER, Options), - 'oe_CosEventComm_Channel':oe_create([Options, ServerOpts], ServerOpts); -start_channel(Options) -> - orber:dbg("[~p] cosEventApp:start_channel(~p);~n" - "Options not correct.", [?LINE, Options], ?DEBUG_LEVEL), - corba:raise(#'BAD_PARAM'{completion_status=?COMPLETED_NO}). - -%%-----------------------------------------------------------% -%% function : start_channel -%% Arguments: - -%% Returns : -%% Effect : -%%------------------------------------------------------------ -start_channel_link() -> - start_channel_link(?DEFAULT_OPTIONS). - -start_channel_link(Options) when is_list(Options) -> - ServerOpts = get_option(?SERVER, Options), - 'oe_CosEventComm_Channel':oe_create_link([Options, ServerOpts], ServerOpts); -start_channel_link(Options) -> - orber:dbg("[~p] cosEventApp:start_channel_link(~p);~n" - "Options not correct.", [?LINE, Options], ?DEBUG_LEVEL), - corba:raise(#'BAD_PARAM'{completion_status=?COMPLETED_NO}). - -%%-----------------------------------------------------------% -%% function : stop_factory -%% Arguments: ChannelObj -%% Returns : -%% Effect : -%%------------------------------------------------------------ -stop_channel(ChannelObj) -> - corba:dispose(ChannelObj). - -%%-----------------------------------------------------------% -%% function : init -%% Arguments: -%% Returns : -%% Effect : -%%------------------------------------------------------------ - -%% Starting using create_factory/X -init(own_init) -> - {ok,{?SUP_FLAG, [?SUP_CHILD]}}; -%% When starting as an application. -init(app_init) -> - {ok,{?SUP_FLAG, [?SUP_CHILD]}}. - -%%-----------------------------------------------------------% -%% function : create_link -%% Arguments: Module - which Module to call -%% Env/ArgList - ordinary oe_create arguments. -%% Returns : -%% Exception: -%% Effect : Necessary since we want the supervisor to be a -%% 'simple_one_for_one'. Otherwise, using for example, -%% 'one_for_one', we have to call supervisor:delete_child -%% to remove the childs startspecification from the -%% supervisors internal state. -%%------------------------------------------------------------ -create_link(Module, Env, ArgList) -> - Module:oe_create_link(Env, ArgList). - - -%%-----------------------------------------------------------% -%% function : get_option -%% Arguments: -%% Returns : -%% Exception: -%% Effect : -%%------------------------------------------------------------ -get_option(Key, OptionList) -> - case lists:keysearch(Key, 1, OptionList) of - {value,{Key,Value}} -> - Value; - _ -> - case lists:keysearch(Key, 1, ?DEFAULT_OPTIONS) of - {value,{Key,Value}} -> - Value; - _-> - {error, "Invalid option"} - end - end. - -%%-----------------------------------------------------------% -%% function : type_check -%% Arguments: Obj - objectrefernce to test. -%% Mod - Module which contains typeID/0. -%% Returns : 'ok' or raises exception. -%% Effect : -%%------------------------------------------------------------ -type_check(_Obj, _Mod, false) -> - ok; -type_check(Obj, Mod, _) -> - case catch corba_object:is_a(Obj, Mod:typeID()) of - true -> - ok; - _ -> - orber:dbg("[~p] cosEventApp:type_check(~p) failed; Should be ~p", - [?LINE, Obj, Mod], ?DEBUG_LEVEL), - corba:raise(#'BAD_PARAM'{completion_status=?COMPLETED_NO}) - end. - -%%-----------------------------------------------------------% -%% function : disconnect -%% Arguments: Module - one of the interfaces defined in CosEventComm. -%% Function - the appropriate disconnect function. -%% Object - the client object reference. -%% Returns : ok -%% Exception: -%% Effect : If the process would try to diconnect itself it could -%% result in a deadlock. Hence, we spawn a new process to do it. -%%------------------------------------------------------------ -disconnect(Module, Function, Object) -> - spawn(cosEventApp, do_disconnect, [Module, Function, Object]), - ok. - -do_disconnect(Module, Function, Object) -> - catch Module:Function(Object), - ?DBG("Disconnect ~p:~p(..).~n", [Module, Function]), - ok. - -%%--------------- END OF MODULE ------------------------------ - - diff --git a/lib/cosEvent/src/cosEventApp.hrl b/lib/cosEvent/src/cosEventApp.hrl deleted file mode 100644 index d801e83530..0000000000 --- a/lib/cosEvent/src/cosEventApp.hrl +++ /dev/null @@ -1,63 +0,0 @@ -%%---------------------------------------------------------------------- -%% -%% %CopyrightBegin% -%% -%% Copyright Ericsson AB 2001-2016. All Rights Reserved. -%% -%% Licensed under the Apache License, Version 2.0 (the "License"); -%% you may not use this file except in compliance with the License. -%% You may obtain a copy of the License at -%% -%% http://www.apache.org/licenses/LICENSE-2.0 -%% -%% Unless required by applicable law or agreed to in writing, software -%% distributed under the License is distributed on an "AS IS" BASIS, -%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -%% See the License for the specific language governing permissions and -%% limitations under the License. -%% -%% %CopyrightEnd% -%% -%% -%%---------------------------------------------------------------------- -%% File : cosEventApp.hrl -%% Description : -%% -%%---------------------------------------------------------------------- - -%%--------------- INCLUDES ----------------------------------- -%% External --include_lib("orber/include/corba.hrl"). --include_lib("orber/include/ifr_types.hrl"). - --define(write_ErrorMsg(Txt, Arg), -error_logger:error_msg("================ CosEvent =================~n" - Txt - "===========================================~n", - Arg)). - - --define(PULL_INTERVAL, pull_interval). --define(TYPECHECK, typecheck). --define(MAXEVENTS, maxEvents). --define(BLOCKING, blocking). --define(SERVER, server_options). --define(DEFAULT_OPTIONS, [{?PULL_INTERVAL, 20}, - {?BLOCKING, true}, - {?TYPECHECK, false}, - {?MAXEVENTS, 300}, - {?SERVER, []}]). - --define(DEBUG_LEVEL, 3). - --ifdef(debug). --define(DBG(F,A), - io:format("[~p (~p)] "++F,[?MODULE, ?LINE]++A)). --else. --define(DBG(F,A), ok). --endif. - - - - -%%--------------- END OF MODULE ---------------------------------------- diff --git a/lib/cosEvent/src/cosEventApp.idl b/lib/cosEvent/src/cosEventApp.idl deleted file mode 100644 index e5a134685f..0000000000 --- a/lib/cosEvent/src/cosEventApp.idl +++ /dev/null @@ -1,26 +0,0 @@ -#ifndef _COS_EVENT_APP_IDL_ -#define _COS_EVENT_APP_IDL_ - -#include<CosEventChannelAdmin.idl> - - -module oe_CosEventComm { - - - interface Event { - oneway void send(in any event); - void send_sync(in any event); - }; - - interface Channel : CosEventChannelAdmin::EventChannel, Event {}; - - interface CAdmin : CosEventChannelAdmin::ConsumerAdmin, Event {}; - - interface PullerS : CosEventChannelAdmin::ProxyPullSupplier, Event {}; - - interface PusherS : CosEventChannelAdmin::ProxyPushSupplier, Event {}; - -}; - - -#endif diff --git a/lib/cosEvent/src/oe_CosEventComm_CAdmin_impl.erl b/lib/cosEvent/src/oe_CosEventComm_CAdmin_impl.erl deleted file mode 100644 index 728c4cc5ab..0000000000 --- a/lib/cosEvent/src/oe_CosEventComm_CAdmin_impl.erl +++ /dev/null @@ -1,234 +0,0 @@ -%%-------------------------------------------------------------------- -%% -%% %CopyrightBegin% -%% -%% Copyright Ericsson AB 2001-2016. All Rights Reserved. -%% -%% Licensed under the Apache License, Version 2.0 (the "License"); -%% you may not use this file except in compliance with the License. -%% You may obtain a copy of the License at -%% -%% http://www.apache.org/licenses/LICENSE-2.0 -%% -%% Unless required by applicable law or agreed to in writing, software -%% distributed under the License is distributed on an "AS IS" BASIS, -%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -%% See the License for the specific language governing permissions and -%% limitations under the License. -%% -%% %CopyrightEnd% -%% -%% -%%---------------------------------------------------------------------- -%% File : oe_CosEventComm_CAdmin_impl.erl -%% Description : -%% -%%---------------------------------------------------------------------- --module(oe_CosEventComm_CAdmin_impl). - -%%---------------------------------------------------------------------- -%% Include files -%%---------------------------------------------------------------------- --include_lib("orber/include/corba.hrl"). --include("cosEventApp.hrl"). - -%%---------------------------------------------------------------------- -%% External exports -%%---------------------------------------------------------------------- --export([init/1, - terminate/2, - code_change/3, - handle_info/2]). - -%% Exports from "CosEventChannelAdmin::ConsumerAdmin" --export([obtain_push_supplier/3, - obtain_pull_supplier/3]). - - -%%---------------------------------------------------------------------- -%% Internal exports -%%---------------------------------------------------------------------- -%% Exports from "oe_CosEventComm::Event" --export([send/3, send_sync/4]). - -%%---------------------------------------------------------------------- -%% Records -%%---------------------------------------------------------------------- --record(state, {channel_pid, typecheck, maxevents, proxies = [], - server_options}). - -%%---------------------------------------------------------------------- -%% Macros -%%---------------------------------------------------------------------- - - -%%====================================================================== -%% External functions -%%====================================================================== -%%---------------------------------------------------------------------- -%% Function : init/1 -%% Returns : {ok, State} | -%% {ok, State, Timeout} | -%% ignore | -%% {stop, Reason} -%% Description: Initiates the server -%%---------------------------------------------------------------------- -init([ChannelPid, TypeCheck, MaxEvents, ServerOpts]) -> - process_flag(trap_exit, true), - {ok, #state{channel_pid = ChannelPid, typecheck = TypeCheck, - maxevents = MaxEvents, server_options = ServerOpts}}. - -%%---------------------------------------------------------------------- -%% Function : terminate/2 -%% Returns : any (ignored by gen_server) -%% Description: Shutdown the server -%%---------------------------------------------------------------------- -terminate(_Reason, _State) -> - ?DBG("Terminating ~p~n", [_Reason]), - ok. - -%%---------------------------------------------------------------------- -%% Function : code_change/3 -%% Returns : {ok, NewState} -%% Description: Convert process state when code is changed -%%---------------------------------------------------------------------- -code_change(_OldVsn, State, _Extra) -> - {ok, State}. - -%%---------------------------------------------------------------------% -%% function : handle_info -%% Arguments: -%% Returns : {noreply, State} | -%% {stop, Reason, State} -%% Effect : Functions demanded by the gen_server module. -%%---------------------------------------------------------------------- -handle_info({'EXIT', Pid, Reason}, #state{channel_pid = Pid} = State) -> - ?DBG("Parent Channel terminated ~p~n", [Reason]), - orber:dbg("[~p] oe_CosEventComm_PullerS_impl:handle_info(~p);~n" - "My Channel terminated and so will I which will cause" - " my children to do the same thing.", - [?LINE, Reason], ?DEBUG_LEVEL), - {stop, Reason, State}; -handle_info({'EXIT', Pid, _Reason}, #state{proxies = Proxies} = State) -> - %% A child terminated which is normal. Hence, no logging. - ?DBG("Probably a child terminated ~p~n", [_Reason]), - {noreply, State#state{proxies = lists:keydelete(Pid, 2, Proxies)}}; -handle_info(_Info, State) -> - ?DBG("Unknown Info ~p~n", [_Info]), - {noreply, State}. - -%%---------------------------------------------------------------------- -%% Function : obtain_push_supplier -%% Arguments : -%% Returns : -%% Description: -%%---------------------------------------------------------------------- -obtain_push_supplier(_, _, #state{server_options = ServerOpts} = State) -> - case catch 'oe_CosEventComm_PusherS':oe_create_link([self(), - State#state.typecheck], - [{sup_child, true}|ServerOpts]) of - {ok, Pid, Proxy} -> - ?DBG("Started a new oe_CosEventComm_PusherS.~n", []), - {reply, Proxy, State#state{proxies = [{Proxy, Pid}|State#state.proxies]}}; - Other -> - orber:dbg("[~p] oe_CosEventComm_CAdmin:obtain_push_supplier();~nError: ~p", - [?LINE, Other], ?DEBUG_LEVEL), - corba:raise(#'INTERNAL'{completion_status=?COMPLETED_NO}) - end. - -%%---------------------------------------------------------------------- -%% Function : obtain_pull_supplier -%% Arguments : -%% Returns : -%% Description: -%%---------------------------------------------------------------------- -obtain_pull_supplier(_, _, #state{server_options = ServerOpts} = State) -> - case catch 'oe_CosEventComm_PullerS':oe_create_link([self(), - State#state.typecheck, - State#state.maxevents], - [{sup_child, true}|ServerOpts]) of - {ok, Pid, Proxy} -> - ?DBG("Started a new oe_CosEventComm_PullerS.~n", []), - {reply, Proxy, State#state{proxies = [{Proxy, Pid}|State#state.proxies]}}; - Other -> - orber:dbg("[~p] oe_CosEventComm_CAdmin:obtain_pull_supplier();~nError: ~p", - [?LINE, Other], ?DEBUG_LEVEL), - corba:raise(#'INTERNAL'{completion_status=?COMPLETED_NO}) - end. - - -%%---------------------------------------------------------------------- -%% Function : send -%% Arguments : -%% Returns : -%% Description: -%%---------------------------------------------------------------------- -send(_, #state{proxies = Proxies} = State, Any) -> - ?DBG("Received Event ~p~n", [Any]), - case send_helper(Proxies, Any, [], false) of - ok -> - ?DBG("Received Event and forwarded it successfully.~n", []), - {noreply, State}; - {error, Dropped} -> - ?DBG("Received Event but forward failed to: ~p~n", [Dropped]), - RemainingProxies = delete_proxies(Dropped, Proxies), - {noreply, State#state{proxies = RemainingProxies}} - end. - -%%---------------------------------------------------------------------- -%% Function : send_sync -%% Arguments : -%% Returns : -%% Description: -%%---------------------------------------------------------------------- -send_sync(_, OE_From, #state{proxies = Proxies} = State, Any) -> - ?DBG("Received Event ~p~n", [Any]), - corba:reply(OE_From, ok), - case send_helper(Proxies, Any, [], true) of - ok -> - ?DBG("Received Event and forwarded (sync) it successfully.~n", []), - {noreply, State}; - {error, Dropped} -> - ?DBG("Received Event but forward (sync) failed to: ~p~n", [Dropped]), - RemainingProxies = delete_proxies(Dropped, Proxies), - {noreply, State#state{proxies = RemainingProxies}} - end. - - -%%====================================================================== -%% Internal functions -%%====================================================================== -send_helper([], _, [], _) -> - ok; -send_helper([], _, Dropped, _) -> - {error, Dropped}; -send_helper([{ObjRef, Pid}|T], Event, Dropped, false) -> - case catch 'oe_CosEventComm_Event':send(ObjRef, Event) of - ok -> - send_helper(T, Event, Dropped, false); - What -> - orber:dbg("[~p] oe_CosEventComm_CAdmin:send_helper(~p, ~p);~n" - "Bad return value ~p. Closing connection.", - [?LINE, ObjRef, Event, What], ?DEBUG_LEVEL), - send_helper(T, Event, [{ObjRef, Pid}|Dropped], false) - end; -send_helper([{ObjRef, Pid}|T], Event, Dropped, Sync) -> - case catch 'oe_CosEventComm_Event':send_sync(ObjRef, Event) of - ok -> - send_helper(T, Event, Dropped, Sync); - What -> - orber:dbg("[~p] oe_CosEventComm_CAdmin:send_helper(~p, ~p);~n" - "Bad return value ~p. Closing connection.", - [?LINE, ObjRef, Event, What], ?DEBUG_LEVEL), - send_helper(T, Event, [{ObjRef, Pid}|Dropped], Sync) - end. - -delete_proxies([], RemainingProxies) -> - RemainingProxies; -delete_proxies([{_,Pid}|T], Proxies) -> - Rest = lists:keydelete(Pid, 2, Proxies), - delete_proxies(T, Rest). - -%%====================================================================== -%% END OF MODULE -%%====================================================================== diff --git a/lib/cosEvent/src/oe_CosEventComm_Channel_impl.erl b/lib/cosEvent/src/oe_CosEventComm_Channel_impl.erl deleted file mode 100644 index 4f53ca6164..0000000000 --- a/lib/cosEvent/src/oe_CosEventComm_Channel_impl.erl +++ /dev/null @@ -1,247 +0,0 @@ -%%-------------------------------------------------------------------- -%% -%% %CopyrightBegin% -%% -%% Copyright Ericsson AB 2001-2016. All Rights Reserved. -%% -%% Licensed under the Apache License, Version 2.0 (the "License"); -%% you may not use this file except in compliance with the License. -%% You may obtain a copy of the License at -%% -%% http://www.apache.org/licenses/LICENSE-2.0 -%% -%% Unless required by applicable law or agreed to in writing, software -%% distributed under the License is distributed on an "AS IS" BASIS, -%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -%% See the License for the specific language governing permissions and -%% limitations under the License. -%% -%% %CopyrightEnd% -%% -%% -%%---------------------------------------------------------------------- -%% File : oe_CosEventComm_Channel_impl.erl -%% Description : -%% -%%---------------------------------------------------------------------- --module(oe_CosEventComm_Channel_impl). - -%%---------------------------------------------------------------------- -%% Include files -%%---------------------------------------------------------------------- --include_lib("orber/include/corba.hrl"). --include("cosEventApp.hrl"). - - -%%---------------------------------------------------------------------- -%% External exports -%%---------------------------------------------------------------------- -%% Mandatory --export([init/1, - terminate/2, - code_change/3, - handle_info/2]). - -%% Exports from "CosEventChannelAdmin::EventChannel" --export([for_consumers/3, - for_suppliers/3, - destroy/3]). - - -%%---------------------------------------------------------------------- -%% Internal exports -%%---------------------------------------------------------------------- -%% Exports from "oe_CosEventComm::Event" --export([send/3, send_sync/4]). - -%%---------------------------------------------------------------------- -%% Records -%%---------------------------------------------------------------------- --record(state, {typecheck, pull_interval, maxevents, blocking, cadmins = [], - server_options}). - -%%---------------------------------------------------------------------- -%% Macros -%%---------------------------------------------------------------------- - -%%====================================================================== -%% External functions -%%====================================================================== -%%---------------------------------------------------------------------- -%% Function : init/1 -%% Returns : {ok, State} | -%% {ok, State, Timeout} | -%% ignore | -%% {stop, Reason} -%% Description: Initiates the server -%%---------------------------------------------------------------------- -init([Options, ServerOpts]) -> - process_flag(trap_exit, true), - PullI = cosEventApp:get_option(?PULL_INTERVAL, Options), - TC = cosEventApp:get_option(?TYPECHECK, Options), - Max = cosEventApp:get_option(?MAXEVENTS, Options), - Blocking = cosEventApp:get_option(?BLOCKING, Options), - {ok, #state{typecheck = TC, pull_interval = PullI, maxevents = Max, - blocking = Blocking, server_options = ServerOpts}}. - -%%---------------------------------------------------------------------- -%% Function : terminate/2 -%% Returns : any (ignored by gen_server) -%% Description: Shutdown the server -%%---------------------------------------------------------------------- -terminate(_Reason, _State) -> - ?DBG("Terminating ~p~n", [_Reason]), - ok. - -%%---------------------------------------------------------------------- -%% Function : code_change/3 -%% Returns : {ok, NewState} -%% Description: Convert process state when code is changed -%%---------------------------------------------------------------------- -code_change(_OldVsn, State, _Extra) -> - {ok, State}. - -%%---------------------------------------------------------------------% -%% function : handle_info -%% Arguments: -%% Returns : {noreply, State} | -%% {stop, Reason, State} -%% Effect : Functions demanded by the gen_server module. -%%---------------------------------------------------------------------- -handle_info({'EXIT', Pid, _Reason}, #state{cadmins = CAdmins} = State) -> - ?DBG("Probably a child terminated with Reason: ~p~n", [_Reason]), - {noreply, State#state{cadmins = lists:keydelete(Pid, 2, CAdmins)}}; -handle_info(_Info, State) -> - ?DBG("Unknown Info ~p~n", [_Info]), - {noreply, State}. - - -%%---------------------------------------------------------------------- -%% Function : for_consumers -%% Arguments : -%% Returns : -%% Description: -%%---------------------------------------------------------------------- -for_consumers(_, _, #state{server_options = ServerOpts} = State) -> - case catch 'oe_CosEventComm_CAdmin':oe_create_link([self(), - State#state.typecheck, - State#state.maxevents, - ServerOpts], - [{sup_child, true}|ServerOpts]) of - {ok, Pid, AdminCo} -> - ?DBG("Created a new oe_CosEventComm_CAdmin.~n", []), - {reply, AdminCo, - State#state{cadmins = [{AdminCo, Pid}|State#state.cadmins]}}; - Other -> - orber:dbg("[~p] oe_CosEventComm_Channel:for_consumers(); Error: ~p", - [?LINE, Other], ?DEBUG_LEVEL), - corba:raise(#'INTERNAL'{completion_status=?COMPLETED_NO}) - end. - -%%---------------------------------------------------------------------- -%% Function : for_suppliers -%% Arguments : -%% Returns : -%% Description: -%%---------------------------------------------------------------------- -for_suppliers(OE_This, _, #state{server_options = ServerOpts} = State) -> - case catch 'CosEventChannelAdmin_SupplierAdmin':oe_create_link([OE_This, self(), - State#state.typecheck, - State#state.pull_interval, - ServerOpts], - [{sup_child, true}|ServerOpts]) of - {ok, _Pid, AdminSu} -> - ?DBG("Created a new CosEventChannelAdmin_SupplierAdmin.~n", []), - {reply, AdminSu, State}; - Other -> - orber:dbg("[~p] oe_CosEventComm_Channel:for_suppliers();~nError: ~p", - [?LINE, Other], ?DEBUG_LEVEL), - corba:raise(#'INTERNAL'{completion_status=?COMPLETED_NO}) - end. - -%%---------------------------------------------------------------------- -%% Function : destroy -%% Arguments : -%% Returns : -%% Description: -%%---------------------------------------------------------------------- -destroy(_, _, State) -> - ?DBG("Destroy invoked.", []), - {stop, normal, ok, State}. - -%%---------------------------------------------------------------------- -%% Function : send -%% Arguments : -%% Returns : -%% Description: -%%---------------------------------------------------------------------- -send(_OE_This, #state{cadmins = CAdmins} = State, Any) -> - ?DBG("Received Event ~p~n", [Any]), - case send_helper(CAdmins, Any, [], false) of - ok -> - ?DBG("Received Event and forwarded it successfully.~n", []), - {noreply, State}; - {error, Dropped} -> - ?DBG("Received Event but forward failed for: ~p~n", [Dropped]), - RemainingAdmins = delete_cadmin(Dropped, CAdmins), - {noreply, State#state{cadmins = RemainingAdmins}} - end. - -%%---------------------------------------------------------------------- -%% Function : send_sync -%% Arguments : -%% Returns : -%% Description: -%%---------------------------------------------------------------------- -send_sync(_OE_This, OE_From, #state{cadmins = CAdmins, blocking = BL} = State, Any) -> - ?DBG("Received Event ~p~n", [Any]), - corba:reply(OE_From, ok), - case send_helper(CAdmins, Any, [], BL) of - ok -> - ?DBG("Received Event and forwarded (sync) it successfully.~n", []), - {reply, ok, State}; - {error, Dropped} -> - ?DBG("Received Event but forward (sync) failed for: ~p~n", [Dropped]), - RemainingAdmins = delete_cadmin(Dropped, CAdmins), - {reply, ok, State#state{cadmins = RemainingAdmins}} - end. - - -%%====================================================================== -%% Internal functions -%%====================================================================== -send_helper([], _, [], _) -> - ok; -send_helper([], _, Dropped, _) -> - {error, Dropped}; -send_helper([{ObjRef, Pid}|T], Event, Dropped, false) -> - case catch 'oe_CosEventComm_CAdmin':send(ObjRef, Event) of - ok -> - send_helper(T, Event, Dropped, false); - What -> - orber:dbg("[~p] oe_CosEventComm_Channel:send_helper(~p, ~p);~n" - "Bad return value ~p. Closing connection.", - [?LINE, ObjRef, Event, What], ?DEBUG_LEVEL), - send_helper(T, Event, [{ObjRef, Pid}|Dropped], false) - end; -send_helper([{ObjRef, Pid}|T], Event, Dropped, Sync) -> - case catch 'oe_CosEventComm_CAdmin':send_sync(ObjRef, Event) of - ok -> - send_helper(T, Event, Dropped, Sync); - What -> - orber:dbg("[~p] oe_CosEventComm_Channel:send_helper(~p, ~p);~n" - "Bad return value ~p. Closing connection.", - [?LINE, ObjRef, Event, What], ?DEBUG_LEVEL), - send_helper(T, Event, [{ObjRef, Pid}|Dropped], Sync) - end. - - -delete_cadmin([], RemainingAdmins) -> - RemainingAdmins; -delete_cadmin([{_,Pid}|T], CAdmins) -> - Rest = lists:keydelete(Pid, 2, CAdmins), - delete_cadmin(T, Rest). - -%%====================================================================== -%% END OF MODULE -%%====================================================================== diff --git a/lib/cosEvent/src/oe_CosEventComm_PullerS_impl.erl b/lib/cosEvent/src/oe_CosEventComm_PullerS_impl.erl deleted file mode 100644 index b431296624..0000000000 --- a/lib/cosEvent/src/oe_CosEventComm_PullerS_impl.erl +++ /dev/null @@ -1,282 +0,0 @@ -%%-------------------------------------------------------------------- -%% -%% %CopyrightBegin% -%% -%% Copyright Ericsson AB 2001-2015. All Rights Reserved. -%% -%% Licensed under the Apache License, Version 2.0 (the "License"); -%% you may not use this file except in compliance with the License. -%% You may obtain a copy of the License at -%% -%% http://www.apache.org/licenses/LICENSE-2.0 -%% -%% Unless required by applicable law or agreed to in writing, software -%% distributed under the License is distributed on an "AS IS" BASIS, -%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -%% See the License for the specific language governing permissions and -%% limitations under the License. -%% -%% %CopyrightEnd% -%% -%% -%%---------------------------------------------------------------------- -%% File : oe_CosEventComm_PullerS_impl.erl -%% Description : -%% -%%---------------------------------------------------------------------- --module(oe_CosEventComm_PullerS_impl). - -%%---------------------------------------------------------------------- -%% Include files -%%---------------------------------------------------------------------- --include_lib("orber/include/corba.hrl"). --include("CosEventChannelAdmin.hrl"). --include("CosEventComm.hrl"). --include("cosEventApp.hrl"). - -%%---------------------------------------------------------------------- -%% External exports -%%---------------------------------------------------------------------- --export([init/1, - terminate/2, - code_change/3, - handle_info/2]). -%% Exports from "CosEventChannelAdmin::ProxyPullSupplier" --export([connect_pull_consumer/4]). - -%% Exports from "CosEventComm::PullSupplier" --export([pull/3, - try_pull/3, - disconnect_pull_supplier/3]). - -%%---------------------------------------------------------------------- -%% Internal exports -%%---------------------------------------------------------------------- -%% Exports from "oe_CosEventComm::Event --export([send/3, send_sync/4]). - -%%---------------------------------------------------------------------- -%% Records -%%---------------------------------------------------------------------- --record(state, {admin_pid, client, db, respond_to, typecheck, maxevents}). - -%%---------------------------------------------------------------------- -%% Macros -%%---------------------------------------------------------------------- - -%%====================================================================== -%% External functions -%%====================================================================== -%%---------------------------------------------------------------------% -%% Function : init/1 -%% Returns : {ok, State} | -%% {ok, State, Timeout} | -%% ignore | -%% {stop, Reason} -%% Description: Initiates the server -%%---------------------------------------------------------------------- -init([AdminPid, TypeCheck, MaxEvents]) -> - process_flag(trap_exit, true), - {ok, #state{admin_pid = AdminPid, - db = ets:new(oe_ets, [set, private, ordered_set]), - typecheck = TypeCheck, maxevents = MaxEvents}}. - -%%---------------------------------------------------------------------% -%% function : handle_info -%% Arguments: -%% Returns : {noreply, State} | -%% {stop, Reason, State} -%% Effect : Functions demanded by the gen_server module. -%% The CosEvent specification states: -%% "A nil object reference may be passed to the connect_pull_consumer operation; -%% if so a channel cannot invoke a disconnect_pull_consumer operation on the -%% consumer; the consumer may be disconnected from the channel without being -%% informed." -%% If we would invoke the disconnect_pull_consumer operation -%% at the same time as the client tries to pull an event it -%% would cause a dead-lock. We can solve this by spawning a process -%% but as is the client will discover that the object no longer exists -%% the next time it tries to pull an event. -%%---------------------------------------------------------------------- -handle_info({'EXIT', Pid, Reason}, #state{admin_pid = Pid} = State) -> - orber:dbg("[~p] oe_CosEventComm_PullerS_impl:handle_info(~p);~n" - "My Admin terminated and so will I.", - [?LINE, Reason], ?DEBUG_LEVEL), - {stop, Reason, State}; -handle_info(_Info, State) -> - ?DBG("Unknown Info ~p~n", [_Info]), - {noreply, State}. - -%%---------------------------------------------------------------------% -%% Function : terminate/2 -%% Returns : any (ignored by gen_server) -%% Description: Shutdown the server -%%---------------------------------------------------------------------- -terminate(_Reason, #state{client = undefined, respond_to = undefined, db = DB}) -> - ?DBG("Terminating ~p; no client connected and no pending pull's.~n", [_Reason]), - ets:delete(DB), - ok; -terminate(_Reason, #state{client = undefined, respond_to = ReplyTo, db = DB}) -> - ?DBG("Terminating ~p; no client connected but a pending pull.~n", [_Reason]), - corba:reply(ReplyTo, {'EXCEPTION', #'CosEventComm_Disconnected'{}}), - ets:delete(DB), - ok; -terminate(_Reason, #state{client = Client, respond_to = undefined, db = DB}) -> - ?DBG("Terminating ~p; no pending pull~n", [_Reason]), - cosEventApp:disconnect('CosEventComm_PullConsumer', - disconnect_pull_consumer, Client), - ets:delete(DB), - ok; -terminate(_Reason, #state{client = Client, respond_to = ReplyTo, db = DB}) -> - ?DBG("Terminating ~p; pending pull~n", [_Reason]), - corba:reply(ReplyTo, {'EXCEPTION', #'CosEventComm_Disconnected'{}}), - cosEventApp:disconnect('CosEventComm_PullConsumer', - disconnect_pull_consumer, Client), - ets:delete(DB), - ok. - -%%---------------------------------------------------------------------% -%% Function : code_change/3 -%% Returns : {ok, NewState} -%% Description: Convert process state when code is changed -%%---------------------------------------------------------------------- -code_change(_OldVsn, State, _Extra) -> - {ok, State}. - -%%---------------------------------------------------------------------% -%% Function : connect_pull_consumer -%% Arguments : -%% Returns : -%% Description: -%%---------------------------------------------------------------------- -connect_pull_consumer(_OE_This, _OE_From, #state{client = undefined, - typecheck = TypeCheck} = State, - NewClient) -> - case corba_object:is_nil(NewClient) of - true -> - ?DBG("A NIL client supplied.~n", []), - {reply, ok, State}; - false -> - cosEventApp:type_check(NewClient, 'CosEventComm_PullConsumer', TypeCheck), - ?DBG("Connected to client.~n", []), - {reply, ok, State#state{client = NewClient}} - end; -connect_pull_consumer(_, _, _, _) -> - corba:raise(#'CosEventChannelAdmin_AlreadyConnected'{}). - - -%%---------------------------------------------------------------------% -%% Function : pull -%% Arguments : -%% Returns : -%% Description: -%%---------------------------------------------------------------------- -pull(_OE_This, OE_From, State) -> - case get_event(State#state.db) of - false -> - ?DBG("pull invoked but no event stored; put the client on hold.~n", []), - {noreply, State#state{respond_to = OE_From}}; - Event -> - ?DBG("pull invoked and returned: ~p~n", [Event]), - {reply, Event, State} - end. - -%%---------------------------------------------------------------------% -%% Function : try_pull -%% Arguments : -%% Returns : -%% Description: -%%---------------------------------------------------------------------- -try_pull(_OE_This, _OE_From, State) -> - case get_event(State#state.db) of - false -> - ?DBG("try_pull invoked but no event stored.~n", []), - {reply, {any:create(orber_tc:long(), 0), false}, State}; - Event -> - ?DBG("try_pull invoked and returned: ~p~n", [Event]), - {reply, {Event, true}, State} - end. - -%%---------------------------------------------------------------------% -%% Function : disconnect_pull_supplier -%% Arguments : -%% Returns : -%% Description: -%%---------------------------------------------------------------------- -disconnect_pull_supplier(_OE_This, _OE_From, State) -> - ?DBG("Disconnect invoked ~p ~n", [State]), - {stop, normal, ok, State#state{client = undefined}}. - - -%%====================================================================== -%% Internal functions -%%====================================================================== -%%---------------------------------------------------------------------% -%% Function : send -%% Arguments : -%% Returns : -%% Description: -%%---------------------------------------------------------------------- -send(_OE_This, #state{respond_to = undefined} = State, Any) -> - ?DBG("Received event ~p and stored it.~n", [Any]), - store_event(State#state.db, State#state.maxevents, Any), - {noreply, State}; -send(_OE_This, State, Any) -> - ?DBG("Received event ~p and sent it to pending client.~n", [Any]), - corba:reply(State#state.respond_to, Any), - {noreply, State#state{respond_to = undefined}}. - -%%---------------------------------------------------------------------% -%% Function : send_sync -%% Arguments : -%% Returns : -%% Description: -%%---------------------------------------------------------------------- -send_sync(_OE_This, _OE_From, #state{respond_to = undefined} = State, Any) -> - ?DBG("Received event ~p and stored it (sync).~n", [Any]), - store_event(State#state.db, State#state.maxevents, Any), - {reply, ok, State}; -send_sync(_OE_This, _OE_From, State, Any) -> - ?DBG("Received event ~p and sent it to pending client (sync).~n", [Any]), - corba:reply(State#state.respond_to, Any), - {reply, ok, State#state{respond_to = undefined}}. - - -%%---------------------------------------------------------------------% -%% Function : store_event -%% Arguments : DB - ets reference -%% Event - CORBA::Any -%% Returns : true -%% Description: Insert the event in FIFO order. -%%---------------------------------------------------------------------- -store_event(DB, Max, Event) -> - case ets:info(DB, size) of - CurrentSize when CurrentSize < Max -> - ets:insert(DB, {{erlang:system_time(), erlang:unique_integer([positive])}, - Event}); - _ -> - orber:dbg("[~p] oe_CosEventComm_PullerS:store_event(~p); DB full drop event.", - [?LINE, Event], ?DEBUG_LEVEL), - true - end. - -%%---------------------------------------------------------------------% -%% Function : get_event -%% Arguments : DB - ets reference -%% Event - CORBA::Any -%% Returns : false | Event (CORBA::Any) -%% Description: Lookup event in FIFO order; return false if no event exists. -%%---------------------------------------------------------------------- -get_event(DB) -> - case ets:first(DB) of - '$end_of_table' -> - false; - Key -> - [{_, Event}] = ets:lookup(DB, Key), - ets:delete(DB, Key), - Event - end. - -%%====================================================================== -%% END OF MODULE -%%====================================================================== diff --git a/lib/cosEvent/src/oe_CosEventComm_PusherS_impl.erl b/lib/cosEvent/src/oe_CosEventComm_PusherS_impl.erl deleted file mode 100644 index ac23412000..0000000000 --- a/lib/cosEvent/src/oe_CosEventComm_PusherS_impl.erl +++ /dev/null @@ -1,218 +0,0 @@ -%%-------------------------------------------------------------------- -%% -%% %CopyrightBegin% -%% -%% Copyright Ericsson AB 2001-2016. All Rights Reserved. -%% -%% Licensed under the Apache License, Version 2.0 (the "License"); -%% you may not use this file except in compliance with the License. -%% You may obtain a copy of the License at -%% -%% http://www.apache.org/licenses/LICENSE-2.0 -%% -%% Unless required by applicable law or agreed to in writing, software -%% distributed under the License is distributed on an "AS IS" BASIS, -%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -%% See the License for the specific language governing permissions and -%% limitations under the License. -%% -%% %CopyrightEnd% -%% -%% -%%---------------------------------------------------------------------- -%% File : oe_CosEventComm_PusherS_impl.erl -%% Description : -%% -%%---------------------------------------------------------------------- --module(oe_CosEventComm_PusherS_impl). - -%%---------------------------------------------------------------------- -%% Include files -%%---------------------------------------------------------------------- --include_lib("orber/include/corba.hrl"). --include("CosEventChannelAdmin.hrl"). --include("CosEventComm.hrl"). --include("cosEventApp.hrl"). - - -%%---------------------------------------------------------------------- -%% External exports -%%---------------------------------------------------------------------- --export([init/1, - terminate/2, - code_change/3, - handle_info/2]). - -%% Exports from "CosEventChannelAdmin::ProxyPushSupplier" --export([connect_push_consumer/4]). - -%% Exports from "CosEventComm::PushSupplier" --export([disconnect_push_supplier/3]). - - -%%---------------------------------------------------------------------- -%% Internal exports -%%---------------------------------------------------------------------- -%% Exports from "oe_CosEventComm::Event" --export([send/3, send_sync/4]). - -%%---------------------------------------------------------------------- -%% Records -%%---------------------------------------------------------------------- --record(state, {admin_pid, client, typecheck}). - -%%---------------------------------------------------------------------- -%% Macros -%%---------------------------------------------------------------------- - -%%====================================================================== -%% External functions -%%====================================================================== -%%---------------------------------------------------------------------- -%% Function : init/1 -%% Returns : {ok, State} | -%% {ok, State, Timeout} | -%% ignore | -%% {stop, Reason} -%% Description: Initiates the server -%%---------------------------------------------------------------------- -init([AdminPid, TypeCheck]) -> - process_flag(trap_exit, true), - {ok, #state{admin_pid = AdminPid, typecheck = TypeCheck}}. - -%%---------------------------------------------------------------------- -%% Function : terminate/2 -%% Returns : any (ignored by gen_server) -%% Description: Shutdown the server -%%---------------------------------------------------------------------- -terminate(_Reason, #state{client = undefined}) -> - ?DBG("Terminating ~p; no client connected.~n", [_Reason]), - ok; -terminate(_Reason, #state{client = Client} = _State) -> - ?DBG("Terminating ~p~n", [_Reason]), - cosEventApp:disconnect('CosEventComm_PushConsumer', - disconnect_push_consumer, Client), - ok. - -%%---------------------------------------------------------------------- -%% Function : code_change/3 -%% Returns : {ok, NewState} -%% Description: Convert process state when code is changed -%%---------------------------------------------------------------------- -code_change(_OldVsn, State, _Extra) -> - {ok, State}. - -%%---------------------------------------------------------------------% -%% function : handle_info -%% Arguments: -%% Returns : {noreply, State} | -%% {stop, Reason, State} -%% Effect : Functions demanded by the gen_server module. -%%---------------------------------------------------------------------- -handle_info({'EXIT', Pid, Reason}, #state{admin_pid = Pid} = State) -> - ?DBG("Parent Admin terminated ~p~n", [Reason]), - orber:dbg("[~p] oe_CosEventComm_PusherS_impl:handle_info(~p);~n" - "My Admin terminated and so will I.", - [?LINE, Reason], ?DEBUG_LEVEL), - {stop, Reason, State}; -handle_info(_Info, State) -> - ?DBG("Unknown Info ~p~n", [_Info]), - {noreply, State}. - -%%---------------------------------------------------------------------% -%% Function : connect_push_consumer -%% Arguments : -%% Returns : -%% Description: -%%---------------------------------------------------------------------- -connect_push_consumer(_OE_This, _, #state{client = undefined, - typecheck = TypeCheck} = State, NewClient) -> - case corba_object:is_nil(NewClient) of - true -> - orber:dbg("[~p] oe_CosEventComm_PusherS_impl:connect_push_consumer(..);~n" - "Supplied a NIL reference which is not allowed.", - [?LINE], ?DEBUG_LEVEL), - corba:raise(#'BAD_PARAM'{completion_status = ?COMPLETED_NO}); - false -> - cosEventApp:type_check(NewClient, 'CosEventComm_PushConsumer', TypeCheck), - ?DBG("Connected to client.~n", []), - {reply, ok, State#state{client = NewClient}} - end; -connect_push_consumer(_, _, _, _) -> - corba:raise(#'CosEventChannelAdmin_AlreadyConnected'{}). - - -%%---------------------------------------------------------------------% -%% Function : disconnect_push_supplier -%% Arguments : -%% Returns : -%% Description: -%%---------------------------------------------------------------------- -disconnect_push_supplier(_OE_This, _, State) -> - ?DBG("Disconnect invoked ~p ~n", [State]), - {stop, normal, ok, State#state{client = undefined}}. - -%%====================================================================== -%% Internal functions -%%====================================================================== -%%---------------------------------------------------------------------- -%% Function : send -%% Arguments : -%% Returns : -%% Description: -%%---------------------------------------------------------------------- -send(_OE_This, #state{client = undefined} = State, _Any) -> - %% No consumer connected. - ?DBG("Received event ~p but have no client.~n", [_Any]), - {noreply, State}; -send(_OE_This, #state{client = Client} = State, Any) -> - %% Push Data - case catch 'CosEventComm_PushConsumer':push(Client, Any) of - ok -> - ?DBG("Received event ~p and delivered it client.~n", [Any]), - {noreply, State}; - {'EXCEPTION', #'CosEventComm_Disconnected'{}} -> - ?DBG("Received event ~p but failed to deliver it since the client claims we are disconnected.~n", [Any]), - {stop, normal, State#state{client = undefined}}; - Other -> - ?DBG("Received event ~p but failed to deliver it to client.~n", [Any]), - orber:dbg("[~p] oe_CosEventComm_PusherS_impl:send(~p);~n" - "My Client behaves badly, returned ~p, so I will terminate.", - [?LINE, Any, Other], ?DEBUG_LEVEL), - {stop, normal, State} - end. - - -%%---------------------------------------------------------------------- -%% Function : send_sync -%% Arguments : -%% Returns : -%% Description: -%%---------------------------------------------------------------------- -send_sync(_OE_This, _OE_From, #state{client = undefined} = State, _Any) -> - %% No consumer connected. - ?DBG("Received event ~p but have no client.~n", [_Any]), - {reply, ok, State}; -send_sync(_OE_This, OE_From, #state{client = Client} = State, Any) -> - corba:reply(OE_From, ok), - %% Push Data - case catch 'CosEventComm_PushConsumer':push(Client, Any) of - ok -> - ?DBG("Received event ~p and delivered (sync) it client.~n", [Any]), - {noreply, State}; - {'EXCEPTION', #'CosEventComm_Disconnected'{}} -> - ?DBG("Received event ~p but failed to deliver (sync) it since the client claims we are disconnected.~n", [Any]), - {stop, normal, State#state{client = undefined}}; - Other -> - ?DBG("Received event ~p but failed to deliver (sync) it to client.~n", [Any]), - orber:dbg("[~p] oe_CosEventComm_PusherS_impl:send_sync(~p);~n" - "My Client behaves badly, returned ~p, so I will terminate.", - [?LINE, Any, Other], ?DEBUG_LEVEL), - {stop, normal, State} - end. - - -%%====================================================================== -%% END OF MODULE -%%====================================================================== - diff --git a/lib/cosEvent/test/Makefile b/lib/cosEvent/test/Makefile deleted file mode 100644 index 878e1c8a4c..0000000000 --- a/lib/cosEvent/test/Makefile +++ /dev/null @@ -1,150 +0,0 @@ -# -# %CopyrightBegin% -# -# Copyright Ericsson AB 1999-2016. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# %CopyrightEnd% -# -# -include $(ERL_TOP)/make/target.mk -include $(ERL_TOP)/make/$(TARGET)/otp.mk - -# ---------------------------------------------------- -# Application version -# ---------------------------------------------------- -include ../vsn.mk -VSN=$(COSEVENT_VSN) -# ---------------------------------------------------- -# Release directory specification -# ---------------------------------------------------- -RELSYSDIR = $(RELEASE_PATH)/cosEvent_test - -# ---------------------------------------------------- -# Target Specs -# ---------------------------------------------------- -TEST_SPEC_FILE = cosEvent.spec -COVER_FILE = cosEvent.cover - - -IDL_FILES = \ - event_test_server.idl \ - -IDLOUTDIR = idl_output - -MODULES = \ - event_test_PushC_impl \ - event_test_PullC_impl \ - event_test_PushS_impl \ - event_test_PullS_impl \ - event_channel_SUITE \ - generated_SUITE - -GEN_MOD_COS = \ - event_test_PullC \ - event_test_PushS \ - event_test_PullS \ - oe_event_test_server \ - event_test_PushC - -GEN_HRL_COS = \ - event_test.hrl \ - event_test_PushC.hrl \ - event_test_PullC.hrl \ - event_test_PushS.hrl \ - event_test_PullS.hrl \ - oe_event_test_server.hrl - - -GEN_MODULES = $(GEN_MOD_COS) - -ERL_FILES = $(MODULES:%=%.erl) - -HRL_FILES = - -GEN_HRL_FILES = $(GEN_HRL_COS) - -GEN_FILES = \ - $(GEN_HRL_FILES:%=$(IDLOUTDIR)/%) \ - $(GEN_MODULES:%=$(IDLOUTDIR)/%.erl) - -GEN_TARGET_FILES = $(GEN_MODULES:%=$(IDLOUTDIR)/%.$(EMULATOR)) - -SUITE_TARGET_FILES = $(MODULES:%=%.$(EMULATOR)) - -TARGET_FILES = \ - $(GEN_TARGET_FILES) \ - $(SUITE_TARGET_FILES) - -# ---------------------------------------------------- -# PROGRAMS -# ---------------------------------------------------- -# ---------------------------------------------------- -# FLAGS -# ---------------------------------------------------- -ERL_IDL_FLAGS += -pa $(ERL_TOP)/lib/orber/ebin -pa $(ERL_TOP)/lib/ic/ebin - -ERL_COMPILE_FLAGS += $(ERL_IDL_FLAGS) \ - -pa $(ERL_TOP)/lib/cosEvent/ebin \ - -pa $(ERL_TOP)/lib/cosEvent/test/idl_output \ - -I$(ERL_TOP)/lib/cosEvent \ - -I$(ERL_TOP)/lib/cosEvent/test/$(IDLOUTDIR) - -# ---------------------------------------------------- -# Targets -# ---------------------------------------------------- -tests debug opt: $(TARGET_FILES) - -clean: - rm -f idl_output/* - rm -rf java_initial_reference_idl java_cos_naming_idl - rm -rf java_iiop_module_idl java_output/* - rm -f $(TARGET_FILES) - rm -f errs core *~ - - -docs: - -# ---------------------------------------------------- -# Special Targets -# ---------------------------------------------------- - -IDL-GENERATED: event_test_server.idl - erlc $(ERL_IDL_FLAGS) -o$(IDLOUTDIR) event_test_server.idl - >IDL-GENERATED - -$(GEN_FILES): IDL-GENERATED - -$(TARGET_FILES): IDL-GENERATED - -# ---------------------------------------------------- -# Release Targets -# ---------------------------------------------------- -# We don't copy generated intermediate erlang and hrl files - -include $(ERL_TOP)/make/otp_release_targets.mk - -release_spec: - -release_docs_spec: - -release_tests_spec: tests - $(INSTALL_DIR) "$(RELSYSDIR)" - $(INSTALL_DATA) $(IDL_FILES) $(TEST_SPEC_FILE) \ - $(COVER_FILE) $(ERL_FILES) "$(RELSYSDIR)" - $(INSTALL_DATA) $(SUITE_TARGET_FILES) "$(RELSYSDIR)" - $(INSTALL_DIR) "$(RELSYSDIR)/$(IDLOUTDIR)" - $(INSTALL_DATA) $(GEN_TARGET_FILES) $(GEN_FILES) \ - "$(RELSYSDIR)/$(IDLOUTDIR)" - diff --git a/lib/cosEvent/test/cosEvent.cover b/lib/cosEvent/test/cosEvent.cover deleted file mode 100644 index df12ea3ca9..0000000000 --- a/lib/cosEvent/test/cosEvent.cover +++ /dev/null @@ -1,2 +0,0 @@ -{incl_app,cosEvent,details}. - diff --git a/lib/cosEvent/test/cosEvent.spec b/lib/cosEvent/test/cosEvent.spec deleted file mode 100644 index f793693779..0000000000 --- a/lib/cosEvent/test/cosEvent.spec +++ /dev/null @@ -1 +0,0 @@ -{suites,"../cosEvent_test",all}. diff --git a/lib/cosEvent/test/event_channel_SUITE.erl b/lib/cosEvent/test/event_channel_SUITE.erl deleted file mode 100644 index bbae8d782a..0000000000 --- a/lib/cosEvent/test/event_channel_SUITE.erl +++ /dev/null @@ -1,326 +0,0 @@ -%%----------------------------------------------------------------- -%% -%% %CopyrightBegin% -%% -%% Copyright Ericsson AB 1997-2016. All Rights Reserved. -%% -%% Licensed under the Apache License, Version 2.0 (the "License"); -%% you may not use this file except in compliance with the License. -%% You may obtain a copy of the License at -%% -%% http://www.apache.org/licenses/LICENSE-2.0 -%% -%% Unless required by applicable law or agreed to in writing, software -%% distributed under the License is distributed on an "AS IS" BASIS, -%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -%% See the License for the specific language governing permissions and -%% limitations under the License. -%% -%% %CopyrightEnd% -%% -%% -%%----------------------------------------------------------------- - --module(event_channel_SUITE). - --include_lib("common_test/include/ct.hrl"). --include_lib("orber/include/corba.hrl"). --include_lib("orber/COSS/CosNaming/CosNaming.hrl"). --include_lib("orber/src/orber_iiop.hrl"). - -%%----------------------------------------------------------------- -%% Macros -%%----------------------------------------------------------------- - --define(default_timeout, test_server:minutes(5)). - - --define(match(ExpectedRes, Expr), - fun() -> - AcTuAlReS = (catch (Expr)), - case AcTuAlReS of - ExpectedRes -> - io:format("------ CORRECT RESULT ------~n~p~n", - [AcTuAlReS]), - AcTuAlReS; - _ -> - io:format("###### ERROR ERROR ######~n~p~n", - [AcTuAlReS]), - exit(AcTuAlReS) - end - end()). - - -%%----------------------------------------------------------------- -%% External exports -%%----------------------------------------------------------------- --export([all/0, suite/0,groups/0,init_per_group/2,end_per_group/2, - event_objects_api/1, events_api/1, events_sync_api/1, - cases/0, init_per_suite/1, end_per_suite/1, - init_per_testcase/2, end_per_testcase/2, app_test/1]). - -%%----------------------------------------------------------------- -%% Internal exports -%%----------------------------------------------------------------- - -suite() -> [{ct_hooks,[ts_install_cth]}]. - -all() -> - cases(). - -groups() -> - []. - -init_per_group(_GroupName, Config) -> - Config. - -end_per_group(_GroupName, Config) -> - Config. - - -cases() -> - [events_api, events_sync_api, event_objects_api, - app_test]. - -%%----------------------------------------------------------------- -%% Init and cleanup functions. -%%----------------------------------------------------------------- - -init_per_testcase(_Case, Config) -> - Dog=test_server:timetrap(?default_timeout), - [{watchdog, Dog}|Config]. - - -end_per_testcase(_Case, Config) -> - Dog = proplists:get_value(watchdog, Config), - test_server:timetrap_cancel(Dog), - ok. - -init_per_suite(Config) when is_list(Config) -> - Path = code:which(?MODULE), - code:add_pathz(filename:join(filename:dirname(Path), "idl_output")), - mnesia:delete_schema([node()]), - mnesia:create_schema([node()]), - orber:install([node()]), - application:start(mnesia), - application:start(orber), - cosEventApp:install(), - cosEventApp:start(), - oe_event_test_server:oe_register(), - Config. - -end_per_suite(Config) when is_list(Config) -> - oe_event_test_server:oe_unregister(), - cosEventApp:stop(), - cosEventApp:uninstall(), - application:stop(orber), - application:stop(mnesia), - mnesia:delete_schema([node()]), - Path = code:which(?MODULE), - code:del_path(filename:join(filename:dirname(Path), "idl_output")), - Config. - -%%----------------------------------------------------------------- -%% Tests app file -%%----------------------------------------------------------------- -app_test(doc) -> []; -app_test(suite) -> []; -app_test(_Config) -> - ok=test_server:app_test(cosEvent), - ok. - - - -%% Testing the CosEvent API to setup a complete service -event_objects_api(_Config) -> - - Ch = ?match({_,key,_,_,_,_}, cosEventApp:start_channel([{typecheck, true}, - {pull_interval, 300}])), - - AC=?match({_,key,_,_,_,_}, - 'CosEventChannelAdmin_EventChannel':for_consumers(Ch)), - AS=?match({_,key,_,_,_,_}, - 'CosEventChannelAdmin_EventChannel':for_suppliers(Ch)), - - PPushS=?match({_,key,_,_,_,_}, - 'CosEventChannelAdmin_ConsumerAdmin':obtain_push_supplier(AC)), - PPullS=?match({_,key,_,_,_,_}, - 'CosEventChannelAdmin_ConsumerAdmin':obtain_pull_supplier(AC)), - - PPushC=?match({_,key,_,_,_,_}, - 'CosEventChannelAdmin_SupplierAdmin':obtain_push_consumer(AS)), - PPullC=?match({_,key,_,_,_,_}, - 'CosEventChannelAdmin_SupplierAdmin':obtain_pull_consumer(AS)), - - PushC=?match({_,key,_,_,_,_}, - 'event_test_PushC':oe_create([])), - PullC=?match({_,key,_,_,_,_}, - 'event_test_PullC':oe_create(PPullC)), - - PushS=?match({_,key,_,_,_,_}, - 'event_test_PushS':oe_create(PPushC)), - - PullS=?match({_,key,_,_,_,_}, - 'event_test_PullS':oe_create([])), - - NIL = corba:create_nil_objref(), - - ?match({'EXCEPTION',{'BAD_PARAM',_,_,_}}, - 'CosEventChannelAdmin_ProxyPushSupplier':connect_push_consumer(PPushS, NIL)), - ?match({'EXCEPTION',{'BAD_PARAM',_,_,_}}, - 'CosEventChannelAdmin_ProxyPushSupplier':connect_push_consumer(PPushS, PullS)), - ?match(ok, 'CosEventChannelAdmin_ProxyPushSupplier':connect_push_consumer(PPushS, PushC)), - ?match({'EXCEPTION',{'CosEventChannelAdmin_AlreadyConnected',_}}, - 'CosEventChannelAdmin_ProxyPushSupplier':connect_push_consumer(PPushS, PushC)), - - ?match(ok, 'CosEventChannelAdmin_ProxyPullSupplier':connect_pull_consumer(PPullS, NIL)), - ?match({'EXCEPTION',{'BAD_PARAM',_,_,_}}, - 'CosEventChannelAdmin_ProxyPullSupplier':connect_pull_consumer(PPullS, PullS)), - ?match(ok, 'CosEventChannelAdmin_ProxyPullSupplier':connect_pull_consumer(PPullS, PullC)), - ?match({'EXCEPTION',{'CosEventChannelAdmin_AlreadyConnected',_}}, - 'CosEventChannelAdmin_ProxyPullSupplier':connect_pull_consumer(PPullS, PullC)), - - ?match(ok, 'CosEventChannelAdmin_ProxyPushConsumer':connect_push_supplier(PPushC, NIL)), - ?match({'EXCEPTION',{'BAD_PARAM',_,_,_}}, - 'CosEventChannelAdmin_ProxyPushConsumer':connect_push_supplier(PPushC, PullS)), - ?match(ok, 'CosEventChannelAdmin_ProxyPushConsumer':connect_push_supplier(PPushC, PushS)), - ?match({'EXCEPTION',{'CosEventChannelAdmin_AlreadyConnected',_}}, - 'CosEventChannelAdmin_ProxyPushConsumer':connect_push_supplier(PPushC, PushS)), - - ?match({'EXCEPTION',{'BAD_PARAM',_,_,_}}, - 'CosEventChannelAdmin_ProxyPullConsumer':connect_pull_supplier(PPullC, NIL)), - ?match({'EXCEPTION',{'BAD_PARAM',_,_,_}}, - 'CosEventChannelAdmin_ProxyPullConsumer':connect_pull_supplier(PPullC, PushS)), - ?match(ok, 'CosEventChannelAdmin_ProxyPullConsumer':connect_pull_supplier(PPullC, PullS)), - ?match({'EXCEPTION',{'CosEventChannelAdmin_AlreadyConnected',_}}, - 'CosEventChannelAdmin_ProxyPullConsumer':connect_pull_supplier(PPullC, PullS)), - - - catch corba:dispose(AC), - %% Wait a couple of seconds to be sure all data removed from DB. - timer:sleep(2000), - - %% Since we terminated ConsumerAdmin only the Supplier Proxies should be terminated. - ?match(true, corba_object:non_existent(AC)), - ?match(true, corba_object:non_existent(PPushS)), - ?match(true, corba_object:non_existent(PPullS)), - - ?match(false, corba_object:non_existent(Ch)), - ?match(false, corba_object:non_existent(AS)), - ?match(false, corba_object:non_existent(PPullC)), - ?match(false, corba_object:non_existent(PPushC)), - - %% Terminate a proxy and check that its admin is unaffected. - catch corba:dispose(PPullC), - timer:sleep(2000), - ?match(false, corba_object:non_existent(AS)), - ?match(true, corba_object:non_existent(PPullC)), - - catch corba:dispose(Ch), - timer:sleep(2000), - - ?match(true, corba_object:non_existent(Ch)), - ?match(true, corba_object:non_existent(AS)), - ?match(true, corba_object:non_existent(PPullC)), - ?match(true, corba_object:non_existent(PPushC)), - - %% The client should be notified; wait for a couple of seconds and check it. - timer:sleep(2000), - ?match(true, corba_object:non_existent(PushC)), - ?match(true, corba_object:non_existent(PullC)), - ?match(true, corba_object:non_existent(PushS)), - ?match(true, corba_object:non_existent(PullS)), - - ok. - -%% Testing the CosEvent API for sending events asynchronous -events_api(_Config) -> - - Ch = ?match({_,key,_,_,_,_}, cosEventApp:start_channel([{typecheck, true}, - {pull_interval, 2}, - {blocking, false}])), - event_sender(Ch). - - -%% Testing the CosEvent API for sending events synchronous -events_sync_api(_Config) -> - - Ch = ?match({_,key,_,_,_,_}, cosEventApp:start_channel([{typecheck, true}, - {pull_interval, 2}, - {blocking, true}])), - event_sender(Ch). - -event_sender(Ch) -> - Event1 = #any{typecode=tk_long, value = 1}, - Event2 = #any{typecode=tk_long, value = 2}, - Event3 = #any{typecode=tk_long, value = 3}, - Event4 = #any{typecode=tk_long, value = 4}, - Event5 = #any{typecode=tk_long, value = 5}, - Event6 = #any{typecode=tk_long, value = 6}, - - AC=?match({_,key,_,_,_,_}, - 'CosEventChannelAdmin_EventChannel':for_consumers(Ch)), - AS=?match({_,key,_,_,_,_}, - 'CosEventChannelAdmin_EventChannel':for_suppliers(Ch)), - - PPushS=?match({_,key,_,_,_,_}, - 'CosEventChannelAdmin_ConsumerAdmin':obtain_push_supplier(AC)), - PPullS=?match({_,key,_,_,_,_}, - 'CosEventChannelAdmin_ConsumerAdmin':obtain_pull_supplier(AC)), - - PPushC=?match({_,key,_,_,_,_}, - 'CosEventChannelAdmin_SupplierAdmin':obtain_push_consumer(AS)), - PPullC=?match({_,key,_,_,_,_}, - 'CosEventChannelAdmin_SupplierAdmin':obtain_pull_consumer(AS)), - - PushC=?match({_,key,_,_,_,_}, 'event_test_PushC':oe_create([])), - PullC=?match({_,key,_,_,_,_}, 'event_test_PullC':oe_create(PPullS)), - - PushS=?match({_,key,_,_,_,_}, 'event_test_PushS':oe_create(PPushC)), - - PullS=?match({_,key,_,_,_,_}, 'event_test_PullS':oe_create([])), - - ?match(ok, 'CosEventChannelAdmin_ProxyPushSupplier':connect_push_consumer(PPushS, PushC)), - ?match(ok, 'CosEventChannelAdmin_ProxyPullSupplier':connect_pull_consumer(PPullS, PullC)), - ?match(ok, 'CosEventChannelAdmin_ProxyPushConsumer':connect_push_supplier(PPushC, PushS)), - ?match(ok, 'CosEventChannelAdmin_ProxyPullConsumer':connect_pull_supplier(PPullC, PullS)), - - %% No events should be available at the consumer side at this point. - ?match({_, false}, event_test_PullC:do_try_pull(PullC)), - ?match([], event_test_PushC:get_data(PushC)), - - %% Push an event and wait to be sure it have reached the destination. - ?match(ok, event_test_PushS:do_push(PushS, Event1)), - ?match(ok, event_test_PushS:do_push(PushS, Event2)), - ?match(ok, event_test_PushS:do_push(PushS, Event3)), - timer:sleep(2000), - ?match({Event1, true}, event_test_PullC:do_try_pull(PullC)), - ?match({Event2, true}, event_test_PullC:do_try_pull(PullC)), - ?match({Event3, true}, event_test_PullC:do_try_pull(PullC)), - ?match({_, false}, event_test_PullC:do_try_pull(PullC)), - ?match([Event1, Event2, Event3], event_test_PushC:get_data(PushC)), - - ?match(ok, event_test_PullS:add_event(PullS, Event4)), - ?match(ok, event_test_PullS:add_event(PullS, Event5)), - ?match(ok, event_test_PullS:add_event(PullS, Event6)), - - %% Since the pull operation is blocking we do not need to "sleep". - %% The ProxyPullConsumer will pull for events according to the pull_interval - %% parameter given when started the channel. - ?match(Event4, event_test_PullC:do_pull(PullC)), - ?match(Event5, event_test_PullC:do_pull(PullC)), - ?match(Event6, event_test_PullC:do_pull(PullC)), - - timer:sleep(2000), - ?match([Event4, Event5, Event6], event_test_PushC:get_data(PushC)), - - - catch corba:dispose(Ch), - %% The client should be notified; wait for a couple of seconds and check it. - timer:sleep(2000), - ?match(true, corba_object:non_existent(PushC)), - ?match(true, corba_object:non_existent(PullC)), - ?match(true, corba_object:non_existent(PushS)), - ?match(true, corba_object:non_existent(PullS)), - - ok. diff --git a/lib/cosEvent/test/event_test_PullC_impl.erl b/lib/cosEvent/test/event_test_PullC_impl.erl deleted file mode 100644 index fb72d2e595..0000000000 --- a/lib/cosEvent/test/event_test_PullC_impl.erl +++ /dev/null @@ -1,44 +0,0 @@ -%%------------------------------------------------------------------------ -%% -%% %CopyrightBegin% -%% -%% Copyright Ericsson AB 2001-2016. All Rights Reserved. -%% -%% Licensed under the Apache License, Version 2.0 (the "License"); -%% you may not use this file except in compliance with the License. -%% You may obtain a copy of the License at -%% -%% http://www.apache.org/licenses/LICENSE-2.0 -%% -%% Unless required by applicable law or agreed to in writing, software -%% distributed under the License is distributed on an "AS IS" BASIS, -%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -%% See the License for the specific language governing permissions and -%% limitations under the License. -%% -%% %CopyrightEnd% -%% -%% -%%------------------------------------------------------------------------ -%% Description: a very simple implementation of PullConsumer interface -%%------------------------------------------------------------------------ --module(event_test_PullC_impl). - --export([init/1, terminate/2, disconnect_pull_consumer/1, do_pull/1, do_try_pull/1]). - -init(Proxy) -> - {ok, Proxy}. - -terminate(_From, _Reason) -> - ok. - -disconnect_pull_consumer(Proxy) -> - io:format("event_test_PullC terminates~n",[]), - {stop, normal, ok, Proxy}. - -do_pull(Proxy) -> - {reply, 'CosEventComm_PullSupplier':pull(Proxy), Proxy}. - -do_try_pull(Proxy) -> - {reply, 'CosEventComm_PullSupplier':try_pull(Proxy), Proxy}. - diff --git a/lib/cosEvent/test/event_test_PullS_impl.erl b/lib/cosEvent/test/event_test_PullS_impl.erl deleted file mode 100644 index de59b251da..0000000000 --- a/lib/cosEvent/test/event_test_PullS_impl.erl +++ /dev/null @@ -1,58 +0,0 @@ -%%------------------------------------------------------------------------ -%% -%% %CopyrightBegin% -%% -%% Copyright Ericsson AB 2001-2016. All Rights Reserved. -%% -%% Licensed under the Apache License, Version 2.0 (the "License"); -%% you may not use this file except in compliance with the License. -%% You may obtain a copy of the License at -%% -%% http://www.apache.org/licenses/LICENSE-2.0 -%% -%% Unless required by applicable law or agreed to in writing, software -%% distributed under the License is distributed on an "AS IS" BASIS, -%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -%% See the License for the specific language governing permissions and -%% limitations under the License. -%% -%% %CopyrightEnd% -%% -%% -%%------------------------------------------------------------------------ -%% Description: a very simple implementation of Pull Supplier interface -%%------------------------------------------------------------------------ --module(event_test_PullS_impl). - --include_lib("orber/include/corba.hrl"). - --export([init/1, terminate/2, pull/1, try_pull/1, disconnect_pull_supplier/1, - add_event/2]). - -init(_) -> - {ok, []}. - -terminate(_From, _Reason) -> - ok. - -pull([]) -> - corba:raise(#'INTERNAL'{completion_status = ?COMPLETED_NO}); -pull([Event|Events]) -> - {reply, Event, Events}. - -try_pull([]) -> - {reply, {#any{typecode=tk_null, value = null}, false}, []}; -try_pull([Event|Events]) -> - {reply, {Event, true}, Events}. - -disconnect_pull_supplier(Events) -> - io:format("event_test_PullS terminates ~p~n", [Events]), - {stop, normal, ok, Events}. - - -add_event(Events, Event) -> - %% Store in FIFO order; don't really care if we use '++' since - %% this operation is used in tests only. - {reply, ok, Events ++ [Event]}. - - diff --git a/lib/cosEvent/test/event_test_PushC_impl.erl b/lib/cosEvent/test/event_test_PushC_impl.erl deleted file mode 100644 index 98e4d611fc..0000000000 --- a/lib/cosEvent/test/event_test_PushC_impl.erl +++ /dev/null @@ -1,47 +0,0 @@ -%%------------------------------------------------------------------------ -%% -%% %CopyrightBegin% -%% -%% Copyright Ericsson AB 2001-2016. All Rights Reserved. -%% -%% Licensed under the Apache License, Version 2.0 (the "License"); -%% you may not use this file except in compliance with the License. -%% You may obtain a copy of the License at -%% -%% http://www.apache.org/licenses/LICENSE-2.0 -%% -%% Unless required by applicable law or agreed to in writing, software -%% distributed under the License is distributed on an "AS IS" BASIS, -%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -%% See the License for the specific language governing permissions and -%% limitations under the License. -%% -%% %CopyrightEnd% -%% -%% -%%------------------------------------------------------------------------ -%% Description: a very simple implementation of Push Consumer interface -%%------------------------------------------------------------------------ - --module(event_test_PushC_impl). - --export([init/1, terminate/2, push/2, disconnect_push_consumer/1, get_data/1]). - -init(_) -> - {ok, []}. - -terminate(_From, _Reason) -> - ok. - -push(Events, Event) -> - {reply, ok, [Event|Events]}. - -disconnect_push_consumer(Events) -> - io:format("event_test_PushC terminates: ~p~n", [Events]), - {stop, normal, ok, Events}. - - -get_data(Events) -> - %% Returns Events in FIFO order and reset state. - {reply, lists:reverse(Events), []}. - diff --git a/lib/cosEvent/test/event_test_PushS_impl.erl b/lib/cosEvent/test/event_test_PushS_impl.erl deleted file mode 100644 index 062ee8a311..0000000000 --- a/lib/cosEvent/test/event_test_PushS_impl.erl +++ /dev/null @@ -1,42 +0,0 @@ -%%------------------------------------------------------------------------ -%% -%% %CopyrightBegin% -%% -%% Copyright Ericsson AB 2001-2016. All Rights Reserved. -%% -%% Licensed under the Apache License, Version 2.0 (the "License"); -%% you may not use this file except in compliance with the License. -%% You may obtain a copy of the License at -%% -%% http://www.apache.org/licenses/LICENSE-2.0 -%% -%% Unless required by applicable law or agreed to in writing, software -%% distributed under the License is distributed on an "AS IS" BASIS, -%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -%% See the License for the specific language governing permissions and -%% limitations under the License. -%% -%% %CopyrightEnd% -%% -%% -%%------------------------------------------------------------------------ -%% Description: a very simple implementation of Push Supplier interface -%%------------------------------------------------------------------------ - --module(event_test_PushS_impl). - --export([init/1, terminate/2, disconnect_push_supplier/1, do_push/2]). - -init(Proxy) -> - {ok, Proxy}. - -terminate(_From, _Reason) -> - ok. - -disconnect_push_supplier(Proxy) -> - io:format("event_test_PullC terminates~n",[]), - {stop, normal, ok, Proxy}. - -do_push(Proxy, Event) -> - {reply, 'CosEventComm_PushConsumer':push(Proxy, Event), Proxy}. - diff --git a/lib/cosEvent/test/event_test_server.idl b/lib/cosEvent/test/event_test_server.idl deleted file mode 100644 index f76ac085e1..0000000000 --- a/lib/cosEvent/test/event_test_server.idl +++ /dev/null @@ -1,48 +0,0 @@ -// -// %CopyrightBegin% -// -// Copyright Ericsson AB 2001-2016. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// %CopyrightEnd% -// - -#ifndef _EVENT_TEST_SERVER_IDL -#define _EVENT_TEST_SERVER_IDL - -#include <../src/CosEventComm.idl> - -module event_test { - - interface PushC : CosEventComm::PushConsumer { - typedef sequence<any> AnySeq; - AnySeq get_data(); - }; - interface PullC : CosEventComm::PullConsumer { - any do_pull(); - any do_try_pull(out boolean has_event); - }; - - interface PushS : CosEventComm::PushSupplier { - void do_push(in any Event); - }; - interface PullS : CosEventComm::PullSupplier { - void add_event(in any Event); - }; - -}; - -#endif - - diff --git a/lib/cosEvent/test/generated_SUITE.erl b/lib/cosEvent/test/generated_SUITE.erl deleted file mode 100644 index 86794023af..0000000000 --- a/lib/cosEvent/test/generated_SUITE.erl +++ /dev/null @@ -1,473 +0,0 @@ -%%----------------------------------------------------------------- -%% -%% %CopyrightBegin% -%% -%% Copyright Ericsson AB 2004-2016. All Rights Reserved. -%% -%% Licensed under the Apache License, Version 2.0 (the "License"); -%% you may not use this file except in compliance with the License. -%% You may obtain a copy of the License at -%% -%% http://www.apache.org/licenses/LICENSE-2.0 -%% -%% Unless required by applicable law or agreed to in writing, software -%% distributed under the License is distributed on an "AS IS" BASIS, -%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -%% See the License for the specific language governing permissions and -%% limitations under the License. -%% -%% %CopyrightEnd% -%% -%% -%%----------------------------------------------------------------- -%% File : generated_SUITE.erl -%% Purpose : -%%----------------------------------------------------------------- - --module(generated_SUITE). - --include_lib("common_test/include/ct.hrl"). --include_lib("orber/include/corba.hrl"). - --define(default_timeout, test_server:minutes(3)). - --define(match(ExpectedRes, Expr), - fun() -> - AcTuAlReS = (catch (Expr)), - case AcTuAlReS of - ExpectedRes -> - AcTuAlReS; - _ -> - io:format("###### ERROR ERROR ######~n~p~n", - [AcTuAlReS]), - exit(AcTuAlReS) - end - end()). - --define(nomatch(Not, Expr), - fun() -> - AcTuAlReS = (catch (Expr)), - case AcTuAlReS of - Not -> - io:format("###### ERROR ERROR ######~n~p~n", - [AcTuAlReS]), - exit(AcTuAlReS); - _ -> - AcTuAlReS - end - end()). - - --define(checktc(_Op), - fun(TC) -> - case orber_tc:check_tc(TC) of - false -> - io:format("###### ERROR ERROR ######~n~p - ~p~n", [Op, TC]), - exit(TC); - true -> - true - end - end). - -%%----------------------------------------------------------------- -%% External exports -%%----------------------------------------------------------------- --export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1, - init_per_group/2,end_per_group/2]). - -%%----------------------------------------------------------------- -%% Internal exports -%%----------------------------------------------------------------- --compile(export_all). - -%%----------------------------------------------------------------- -%% Func: all/1 -%% Args: -%% Returns: -%%----------------------------------------------------------------- -suite() -> [{ct_hooks,[ts_install_cth]}]. - -all() -> - ['CosEventChannelAdmin_AlreadyConnected', - 'CosEventChannelAdmin_TypeError', - 'CosEventComm_Disconnected', - 'CosEventChannelAdmin_ConsumerAdmin', - 'CosEventChannelAdmin_EventChannel', - 'CosEventChannelAdmin_ProxyPullConsumer', - 'CosEventChannelAdmin_ProxyPullSupplier', - 'CosEventChannelAdmin_ProxyPushConsumer', - 'CosEventChannelAdmin_ProxyPushSupplier', - 'CosEventChannelAdmin_SupplierAdmin', - oe_CosEventComm_CAdmin, oe_CosEventComm_Channel, - oe_CosEventComm_Event, oe_CosEventComm_PullerS, - oe_CosEventComm_PusherS, 'CosEventComm_PullConsumer', - 'CosEventComm_PullSupplier', - 'CosEventComm_PushConsumer', - 'CosEventComm_PushSupplier']. - -groups() -> - []. - -init_per_suite(Config) -> - Config. - -end_per_suite(_Config) -> - ok. - -init_per_group(_GroupName, Config) -> - Config. - -end_per_group(_GroupName, Config) -> - Config. - - -%%----------------------------------------------------------------- -%% Init and cleanup functions. -%%----------------------------------------------------------------- -init_per_testcase(_Case, Config) -> - Dog=test_server:timetrap(?default_timeout), - [{watchdog, Dog}|Config]. - - -end_per_testcase(_Case, Config) -> - Dog = proplists:get_value(watchdog, Config), - test_server:timetrap_cancel(Dog), - ok. - - -%%----------------------------------------------------------------- -%% Test Case: 'CosEventChannelAdmin_AlreadyConnected' -%% Description: -%%----------------------------------------------------------------- -'CosEventChannelAdmin_AlreadyConnected'(_) -> - ?match(true, orber_tc:check_tc('CosEventChannelAdmin_AlreadyConnected':tc())), - ?match("IDL:omg.org/CosEventChannelAdmin/AlreadyConnected:1.0", - 'CosEventChannelAdmin_AlreadyConnected':id()), - ?match("CosEventChannelAdmin_AlreadyConnected", - 'CosEventChannelAdmin_AlreadyConnected':name()), - ok. - - -%%----------------------------------------------------------------- -%% Test Case: 'CosEventChannelAdmin_TypeError' -%% Description: -%%----------------------------------------------------------------- -'CosEventChannelAdmin_TypeError'(_) -> - ?match(true, orber_tc:check_tc('CosEventChannelAdmin_TypeError':tc())), - ?match("IDL:omg.org/CosEventChannelAdmin/TypeError:1.0", - 'CosEventChannelAdmin_TypeError':id()), - ?match("CosEventChannelAdmin_TypeError", - 'CosEventChannelAdmin_TypeError':name()), - ok. - - -%%----------------------------------------------------------------- -%% Test Case: 'CosEventComm_Disconnected' -%% Description: -%%----------------------------------------------------------------- -'CosEventComm_Disconnected'(_) -> - ?match(true, orber_tc:check_tc('CosEventComm_Disconnected':tc())), - ?match("IDL:omg.org/CosEventComm/Disconnected:1.0", - 'CosEventComm_Disconnected':id()), - ?match("CosEventComm_Disconnected", 'CosEventComm_Disconnected':name()), - ok. - - -%%----------------------------------------------------------------- -%% Test Case: 'CosEventChannelAdmin_ConsumerAdmin' -%% Description: -%%----------------------------------------------------------------- -'CosEventChannelAdmin_ConsumerAdmin'(_) -> - ?nomatch(undefined, 'CosEventChannelAdmin_ConsumerAdmin':oe_tc(obtain_push_supplier)), - ?nomatch(undefined, 'CosEventChannelAdmin_ConsumerAdmin':oe_tc(obtain_pull_supplier)), - ?match(undefined, 'CosEventChannelAdmin_ConsumerAdmin':oe_tc(undefined)), - ?match([_|_], 'CosEventChannelAdmin_ConsumerAdmin':oe_get_interface()), - ?match("IDL:omg.org/CosEventChannelAdmin/ConsumerAdmin:1.0", - 'CosEventChannelAdmin_ConsumerAdmin':typeID()), - check_tc('CosEventChannelAdmin_ConsumerAdmin':oe_get_interface()), - ?match(true, 'CosEventChannelAdmin_ConsumerAdmin':oe_is_a('CosEventChannelAdmin_ConsumerAdmin':typeID())), - ?match(false, 'CosEventChannelAdmin_ConsumerAdmin':oe_is_a("wrong")), - ok. - -%%----------------------------------------------------------------- -%% Test Case: 'CosEventChannelAdmin_EventChannel' -%% Description: -%%----------------------------------------------------------------- -'CosEventChannelAdmin_EventChannel'(_) -> - ?nomatch(undefined, 'CosEventChannelAdmin_EventChannel':oe_tc(for_consumers)), - ?nomatch(undefined, 'CosEventChannelAdmin_EventChannel':oe_tc(for_suppliers)), - ?nomatch(undefined, 'CosEventChannelAdmin_EventChannel':oe_tc(destroy)), - ?match(undefined, 'CosEventChannelAdmin_EventChannel':oe_tc(undefined)), - ?match([_|_], 'CosEventChannelAdmin_EventChannel':oe_get_interface()), - ?match("IDL:omg.org/CosEventChannelAdmin/EventChannel:1.0", - 'CosEventChannelAdmin_EventChannel':typeID()), - check_tc('CosEventChannelAdmin_EventChannel':oe_get_interface()), - ?match(true, 'CosEventChannelAdmin_EventChannel':oe_is_a('CosEventChannelAdmin_EventChannel':typeID())), - ?match(false, 'CosEventChannelAdmin_EventChannel':oe_is_a("wrong")), - ok. - -%%----------------------------------------------------------------- -%% Test Case: 'CosEventChannelAdmin_ProxyPullConsumer' -%% Description: -%%----------------------------------------------------------------- -'CosEventChannelAdmin_ProxyPullConsumer'(_) -> - ?nomatch(undefined, 'CosEventChannelAdmin_ProxyPullConsumer':oe_tc(connect_pull_supplier)), - ?nomatch(undefined, 'CosEventChannelAdmin_ProxyPullConsumer':oe_tc(disconnect_pull_consumer)), - ?match(undefined, 'CosEventChannelAdmin_ProxyPullConsumer':oe_tc(undefined)), - ?match([_|_], 'CosEventChannelAdmin_ProxyPullConsumer':oe_get_interface()), - ?match("IDL:omg.org/CosEventChannelAdmin/ProxyPullConsumer:1.0", - 'CosEventChannelAdmin_ProxyPullConsumer':typeID()), - check_tc('CosEventChannelAdmin_ProxyPullConsumer':oe_get_interface()), - ?match(true, 'CosEventChannelAdmin_ProxyPullConsumer':oe_is_a('CosEventChannelAdmin_ProxyPullConsumer':typeID())), - ?match(true, 'CosEventChannelAdmin_ProxyPullConsumer':oe_is_a('CosEventComm_PullConsumer':typeID())), - ?match(false, 'CosEventChannelAdmin_ProxyPullConsumer':oe_is_a("wrong")), - ok. - -%%----------------------------------------------------------------- -%% Test Case: 'CosEventChannelAdmin_ProxyPullSupplier' -%% Description: -%%----------------------------------------------------------------- -'CosEventChannelAdmin_ProxyPullSupplier'(_) -> - ?nomatch(undefined, 'CosEventChannelAdmin_ProxyPullSupplier':oe_tc(connect_pull_consumer)), - ?nomatch(undefined, 'CosEventChannelAdmin_ProxyPullSupplier':oe_tc(pull)), - ?nomatch(undefined, 'CosEventChannelAdmin_ProxyPullSupplier':oe_tc(try_pull)), - ?nomatch(undefined, 'CosEventChannelAdmin_ProxyPullSupplier':oe_tc(disconnect_pull_supplier)), - ?match(undefined, 'CosEventChannelAdmin_ProxyPullSupplier':oe_tc(undefined)), - ?match([_|_], 'CosEventChannelAdmin_ProxyPullSupplier':oe_get_interface()), - ?match("IDL:omg.org/CosEventChannelAdmin/ProxyPullSupplier:1.0", - 'CosEventChannelAdmin_ProxyPullSupplier':typeID()), - check_tc('CosEventChannelAdmin_ProxyPullSupplier':oe_get_interface()), - ?match(true, 'CosEventChannelAdmin_ProxyPullSupplier':oe_is_a('CosEventChannelAdmin_ProxyPullSupplier':typeID())), - ?match(true, 'CosEventChannelAdmin_ProxyPullSupplier':oe_is_a('CosEventComm_PullSupplier':typeID())), - ?match(false, 'CosEventChannelAdmin_ProxyPullSupplier':oe_is_a("wrong")), - ok. - -%%----------------------------------------------------------------- -%% Test Case: 'CosEventChannelAdmin_ProxyPushConsumer' -%% Description: -%%----------------------------------------------------------------- -'CosEventChannelAdmin_ProxyPushConsumer'(_) -> - ?nomatch(undefined, 'CosEventChannelAdmin_ProxyPushConsumer':oe_tc(connect_push_supplier)), - ?nomatch(undefined, 'CosEventChannelAdmin_ProxyPushConsumer':oe_tc(push)), - ?nomatch(undefined, 'CosEventChannelAdmin_ProxyPushConsumer':oe_tc(disconnect_push_consumer)), - ?match(undefined, 'CosEventChannelAdmin_ProxyPushConsumer':oe_tc(undefined)), - ?match([_|_], 'CosEventChannelAdmin_ProxyPushConsumer':oe_get_interface()), - ?match("IDL:omg.org/CosEventChannelAdmin/ProxyPushConsumer:1.0", - 'CosEventChannelAdmin_ProxyPushConsumer':typeID()), - check_tc('CosEventChannelAdmin_ProxyPushConsumer':oe_get_interface()), - ?match(true, 'CosEventChannelAdmin_ProxyPushConsumer':oe_is_a('CosEventChannelAdmin_ProxyPushConsumer':typeID())), - ?match(true, 'CosEventChannelAdmin_ProxyPushConsumer':oe_is_a('CosEventComm_PushConsumer':typeID())), - ?match(false, 'CosEventChannelAdmin_ProxyPushConsumer':oe_is_a("wrong")), - ok. - -%%----------------------------------------------------------------- -%% Test Case: 'CosEventChannelAdmin_ProxyPushSupplier' -%% Description: -%%----------------------------------------------------------------- -'CosEventChannelAdmin_ProxyPushSupplier'(_) -> - ?nomatch(undefined, 'CosEventChannelAdmin_ProxyPushSupplier':oe_tc(connect_push_consumer)), - ?nomatch(undefined, 'CosEventChannelAdmin_ProxyPushSupplier':oe_tc(disconnect_push_supplier)), - ?match(undefined, 'CosEventChannelAdmin_ProxyPushSupplier':oe_tc(undefined)), - ?match([_|_], 'CosEventChannelAdmin_ProxyPushSupplier':oe_get_interface()), - ?match("IDL:omg.org/CosEventChannelAdmin/ProxyPushSupplier:1.0", - 'CosEventChannelAdmin_ProxyPushSupplier':typeID()), - check_tc('CosEventChannelAdmin_ProxyPushSupplier':oe_get_interface()), - ?match(true, 'CosEventChannelAdmin_ProxyPushSupplier':oe_is_a('CosEventChannelAdmin_ProxyPushSupplier':typeID())), - ?match(true, 'CosEventChannelAdmin_ProxyPushSupplier':oe_is_a('CosEventComm_PushSupplier':typeID())), - ?match(false, 'CosEventChannelAdmin_ProxyPushSupplier':oe_is_a("wrong")), - ok. - -%%----------------------------------------------------------------- -%% Test Case: 'CosEventChannelAdmin_SupplierAdmin' -%% Description: -%%----------------------------------------------------------------- -'CosEventChannelAdmin_SupplierAdmin'(_) -> - ?nomatch(undefined, 'CosEventChannelAdmin_SupplierAdmin':oe_tc(obtain_push_consumer)), - ?nomatch(undefined, 'CosEventChannelAdmin_SupplierAdmin':oe_tc(obtain_pull_consumer)), - ?match(undefined, 'CosEventChannelAdmin_SupplierAdmin':oe_tc(undefined)), - ?match([_|_], 'CosEventChannelAdmin_SupplierAdmin':oe_get_interface()), - ?match("IDL:omg.org/CosEventChannelAdmin/SupplierAdmin:1.0", - 'CosEventChannelAdmin_SupplierAdmin':typeID()), - check_tc('CosEventChannelAdmin_SupplierAdmin':oe_get_interface()), - ?match(true, 'CosEventChannelAdmin_SupplierAdmin':oe_is_a('CosEventChannelAdmin_SupplierAdmin':typeID())), - ?match(false, 'CosEventChannelAdmin_SupplierAdmin':oe_is_a("wrong")), - ok. - -%%----------------------------------------------------------------- -%% Test Case: 'oe_CosEventComm_CAdmin' -%% Description: -%%----------------------------------------------------------------- -'oe_CosEventComm_CAdmin'(_) -> - ?nomatch(undefined, 'oe_CosEventComm_CAdmin':oe_tc(obtain_push_supplier)), - ?nomatch(undefined, 'oe_CosEventComm_CAdmin':oe_tc(obtain_pull_supplier)), - ?nomatch(undefined, 'oe_CosEventComm_CAdmin':oe_tc(send)), - ?nomatch(undefined, 'oe_CosEventComm_CAdmin':oe_tc(send_sync)), - ?match(undefined, 'oe_CosEventComm_CAdmin':oe_tc(undefined)), - ?match([_|_], 'oe_CosEventComm_CAdmin':oe_get_interface()), - ?match("IDL:oe_CosEventComm/CAdmin:1.0", - 'oe_CosEventComm_CAdmin':typeID()), - check_tc('oe_CosEventComm_CAdmin':oe_get_interface()), - ?match(true, 'oe_CosEventComm_CAdmin':oe_is_a('oe_CosEventComm_CAdmin':typeID())), - ?match(true, 'oe_CosEventComm_CAdmin':oe_is_a('CosEventChannelAdmin_ConsumerAdmin':typeID())), - ?match(true, 'oe_CosEventComm_CAdmin':oe_is_a('oe_CosEventComm_Event':typeID())), - ?match(false, 'oe_CosEventComm_CAdmin':oe_is_a("wrong")), - ok. - -%%----------------------------------------------------------------- -%% Test Case: 'oe_CosEventComm_Channel' -%% Description: -%%----------------------------------------------------------------- -'oe_CosEventComm_Channel'(_) -> - ?nomatch(undefined, 'oe_CosEventComm_Channel':oe_tc(for_consumers)), - ?nomatch(undefined, 'oe_CosEventComm_Channel':oe_tc(for_suppliers)), - ?nomatch(undefined, 'oe_CosEventComm_Channel':oe_tc(destroy)), - ?nomatch(undefined, 'oe_CosEventComm_Channel':oe_tc(send)), - ?nomatch(undefined, 'oe_CosEventComm_Channel':oe_tc(send_sync)), - ?match(undefined, 'oe_CosEventComm_Channel':oe_tc(undefined)), - ?match([_|_], 'oe_CosEventComm_Channel':oe_get_interface()), - ?match("IDL:oe_CosEventComm/Channel:1.0", - 'oe_CosEventComm_Channel':typeID()), - check_tc('oe_CosEventComm_Channel':oe_get_interface()), - ?match(true, 'oe_CosEventComm_Channel':oe_is_a('oe_CosEventComm_Channel':typeID())), - ?match(true, 'oe_CosEventComm_Channel':oe_is_a('CosEventChannelAdmin_EventChannel':typeID())), - ?match(true, 'oe_CosEventComm_Channel':oe_is_a('oe_CosEventComm_Event':typeID())), - ?match(false, 'oe_CosEventComm_Channel':oe_is_a("wrong")), - ok. - -%%----------------------------------------------------------------- -%% Test Case: 'oe_CosEventComm_Event' -%% Description: -%%----------------------------------------------------------------- -'oe_CosEventComm_Event'(_) -> - ?nomatch(undefined, 'oe_CosEventComm_Event':oe_tc(send)), - ?nomatch(undefined, 'oe_CosEventComm_Event':oe_tc(send_sync)), - ?match(undefined, 'oe_CosEventComm_Event':oe_tc(undefined)), - ?match([_|_], 'oe_CosEventComm_Event':oe_get_interface()), - ?match("IDL:oe_CosEventComm/Event:1.0", - 'oe_CosEventComm_Event':typeID()), - check_tc('oe_CosEventComm_Event':oe_get_interface()), - ?match(true, 'oe_CosEventComm_Event':oe_is_a('oe_CosEventComm_Event':typeID())), - ?match(false, 'oe_CosEventComm_Event':oe_is_a("wrong")), - ok. - -%%----------------------------------------------------------------- -%% Test Case: 'oe_CosEventComm_PullerS' -%% Description: -%%----------------------------------------------------------------- -'oe_CosEventComm_PullerS'(_) -> - ?nomatch(undefined, 'oe_CosEventComm_PullerS':oe_tc(connect_pull_consumer)), - ?nomatch(undefined, 'oe_CosEventComm_PullerS':oe_tc(pull)), - ?nomatch(undefined, 'oe_CosEventComm_PullerS':oe_tc(try_pull)), - ?nomatch(undefined, 'oe_CosEventComm_PullerS':oe_tc(disconnect_pull_supplier)), - ?nomatch(undefined, 'oe_CosEventComm_PullerS':oe_tc(send)), - ?nomatch(undefined, 'oe_CosEventComm_PullerS':oe_tc(send_sync)), - ?match(undefined, 'oe_CosEventComm_PullerS':oe_tc(undefined)), - ?match([_|_], 'oe_CosEventComm_PullerS':oe_get_interface()), - ?match("IDL:oe_CosEventComm/PullerS:1.0", - 'oe_CosEventComm_PullerS':typeID()), - check_tc('oe_CosEventComm_PullerS':oe_get_interface()), - ?match(true, 'oe_CosEventComm_PullerS':oe_is_a('oe_CosEventComm_PullerS':typeID())), - ?match(true, 'oe_CosEventComm_PullerS':oe_is_a('CosEventChannelAdmin_ProxyPullSupplier':typeID())), - ?match(true, 'oe_CosEventComm_PullerS':oe_is_a('CosEventComm_PullSupplier':typeID())), - ?match(true, 'oe_CosEventComm_PullerS':oe_is_a('oe_CosEventComm_Event':typeID())), - ?match(false, 'oe_CosEventComm_PullerS':oe_is_a("wrong")), - ok. - -%%----------------------------------------------------------------- -%% Test Case: 'oe_CosEventComm_PusherS' -%% Description: -%%----------------------------------------------------------------- -'oe_CosEventComm_PusherS'(_) -> - ?nomatch(undefined, 'oe_CosEventComm_PusherS':oe_tc(connect_push_consumer)), - ?nomatch(undefined, 'oe_CosEventComm_PusherS':oe_tc(disconnect_push_supplier)), - ?nomatch(undefined, 'oe_CosEventComm_PusherS':oe_tc(send)), - ?nomatch(undefined, 'oe_CosEventComm_PusherS':oe_tc(send_sync)), - ?match(undefined, 'oe_CosEventComm_PusherS':oe_tc(undefined)), - ?match([_|_], 'oe_CosEventComm_PusherS':oe_get_interface()), - ?match("IDL:oe_CosEventComm/PusherS:1.0", - 'oe_CosEventComm_PusherS':typeID()), - check_tc('oe_CosEventComm_PusherS':oe_get_interface()), - ?match(true, 'oe_CosEventComm_PusherS':oe_is_a('oe_CosEventComm_PusherS':typeID())), - ?match(true, 'oe_CosEventComm_PusherS':oe_is_a('CosEventChannelAdmin_ProxyPushSupplier':typeID())), - ?match(true, 'oe_CosEventComm_PusherS':oe_is_a('CosEventComm_PushSupplier':typeID())), - ?match(true, 'oe_CosEventComm_PusherS':oe_is_a('oe_CosEventComm_Event':typeID())), - ?match(false, 'oe_CosEventComm_PusherS':oe_is_a("wrong")), - ok. - -%%----------------------------------------------------------------- -%% Test Case: 'CosEventComm_PullConsumer' -%% Description: -%%----------------------------------------------------------------- -'CosEventComm_PullConsumer'(_) -> - ?nomatch(undefined, 'CosEventComm_PullConsumer':oe_tc(disconnect_pull_consumer)), - ?match(undefined, 'CosEventComm_PullConsumer':oe_tc(undefined)), - ?match([_|_], 'CosEventComm_PullConsumer':oe_get_interface()), - ?match("IDL:omg.org/CosEventComm/PullConsumer:1.0", - 'CosEventComm_PullConsumer':typeID()), - check_tc('CosEventComm_PullConsumer':oe_get_interface()), - ?match(true, 'CosEventComm_PullConsumer':oe_is_a('CosEventComm_PullConsumer':typeID())), - ?match(false, 'CosEventComm_PullConsumer':oe_is_a("wrong")), - ok. - -%%----------------------------------------------------------------- -%% Test Case: 'CosEventComm_PullSupplier' -%% Description: -%%----------------------------------------------------------------- -'CosEventComm_PullSupplier'(_) -> - ?nomatch(undefined, 'CosEventComm_PullSupplier':oe_tc(pull)), - ?nomatch(undefined, 'CosEventComm_PullSupplier':oe_tc(try_pull)), - ?nomatch(undefined, 'CosEventComm_PullSupplier':oe_tc(disconnect_pull_supplier)), - ?match(undefined, 'CosEventComm_PullSupplier':oe_tc(undefined)), - ?match([_|_], 'CosEventComm_PullSupplier':oe_get_interface()), - ?match("IDL:omg.org/CosEventComm/PullSupplier:1.0", - 'CosEventComm_PullSupplier':typeID()), - check_tc('CosEventComm_PullSupplier':oe_get_interface()), - ?match(true, 'CosEventComm_PullSupplier':oe_is_a('CosEventComm_PullSupplier':typeID())), - ?match(false, 'CosEventComm_PullSupplier':oe_is_a("wrong")), - ok. - -%%----------------------------------------------------------------- -%% Test Case: 'CosEventComm_PushConsumer' -%% Description: -%%----------------------------------------------------------------- -'CosEventComm_PushConsumer'(_) -> - ?nomatch(undefined, 'CosEventComm_PushConsumer':oe_tc(push)), - ?nomatch(undefined, 'CosEventComm_PushConsumer':oe_tc(disconnect_push_consumer)), - ?match(undefined, 'CosEventComm_PushConsumer':oe_tc(undefined)), - ?match([_|_], 'CosEventComm_PushConsumer':oe_get_interface()), - ?match("IDL:omg.org/CosEventComm/PushConsumer:1.0", - 'CosEventComm_PushConsumer':typeID()), - check_tc('CosEventComm_PushConsumer':oe_get_interface()), - ?match(true, 'CosEventComm_PushConsumer':oe_is_a('CosEventComm_PushConsumer':typeID())), - ?match(false, 'CosEventComm_PushConsumer':oe_is_a("wrong")), - ok. - -%%----------------------------------------------------------------- -%% Test Case: 'CosEventComm_PushSupplier' -%% Description: -%%----------------------------------------------------------------- -'CosEventComm_PushSupplier'(_) -> - ?nomatch(undefined, 'CosEventComm_PushSupplier':oe_tc(disconnect_push_supplier)), - ?match(undefined, 'CosEventComm_PushSupplier':oe_tc(undefined)), - ?match([_|_], 'CosEventComm_PushSupplier':oe_get_interface()), - ?match("IDL:omg.org/CosEventComm/PushSupplier:1.0", - 'CosEventComm_PushSupplier':typeID()), - check_tc('CosEventComm_PushSupplier':oe_get_interface()), - ?match(true, 'CosEventComm_PushSupplier':oe_is_a('CosEventComm_PushSupplier':typeID())), - ?match(false, 'CosEventComm_PushSupplier':oe_is_a("wrong")), - ok. - - - -%%----------------------------------------------------------------- -%% MISC functions -%%----------------------------------------------------------------- -check_tc([]) -> - ok; -check_tc([{Op, {RetType, InParameters, OutParameters}}|T]) -> - io:format("checked - ~s~n", [Op]), - lists:all(?checktc(Op), [RetType|InParameters]), - lists:all(?checktc(Op), OutParameters), - check_tc(T). - - diff --git a/lib/cosEvent/test/idl_output/.gitignore b/lib/cosEvent/test/idl_output/.gitignore deleted file mode 100644 index e69de29bb2..0000000000 --- a/lib/cosEvent/test/idl_output/.gitignore +++ /dev/null diff --git a/lib/cosEvent/vsn.mk b/lib/cosEvent/vsn.mk deleted file mode 100644 index 578950294a..0000000000 --- a/lib/cosEvent/vsn.mk +++ /dev/null @@ -1,2 +0,0 @@ -COSEVENT_VSN = 2.2.2 - |