From fed0c47f63b335718048de9f77953c42828bc51b Mon Sep 17 00:00:00 2001 From: Jon Moore Date: Thu, 13 Feb 2014 12:28:14 -0500 Subject: [PATCH] Set up an area for the enhanced 1.2.x interface. * This creates a new package specifically for the 1.2 interface. The idea is that we could collect interface enhancements in similar packages as we go on. * Deprecated the old `Sirius` (1.1.x) interface. Discussion questions: 1. What else should go into this package? Ideally this should be everything that a client would need to interact with. 2. What do you think of creating a versioned package like this? 3. Is the package in the right place? 4. Does the package need a `package.html` (or whatever the ScalaDoc equivalent is)? 5. I suspect we will find we want classes like `Sirius1Dot2Impl` that are essentially interface adapters to a single `SiriusImpl`. One complicating factor is that `SiriusImpl` is a "public" class in 1.1.x because the `SiriusFactory` returns it. So probably the single, private core class needs a different name (`SiriusFacade`?). --- .../comcast/xfinity/sirius/api/Sirius.scala | 2 ++ .../sirius/api/api1Dot2/Sirius1Dot2.scala | 35 +++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 src/main/scala/com/comcast/xfinity/sirius/api/api1Dot2/Sirius1Dot2.scala diff --git a/src/main/scala/com/comcast/xfinity/sirius/api/Sirius.scala b/src/main/scala/com/comcast/xfinity/sirius/api/Sirius.scala index a917314e..d6751c05 100644 --- a/src/main/scala/com/comcast/xfinity/sirius/api/Sirius.scala +++ b/src/main/scala/com/comcast/xfinity/sirius/api/Sirius.scala @@ -17,6 +17,8 @@ package com.comcast.xfinity.sirius.api import java.util.concurrent.Future +@deprecated(message = "Please upgrade to using com.comcast.xfinity.sirius.api.api1Dot2.Sirius1Dot2 instead", + since = "1.2.0") trait Sirius { /** diff --git a/src/main/scala/com/comcast/xfinity/sirius/api/api1Dot2/Sirius1Dot2.scala b/src/main/scala/com/comcast/xfinity/sirius/api/api1Dot2/Sirius1Dot2.scala new file mode 100644 index 00000000..ad41e3d0 --- /dev/null +++ b/src/main/scala/com/comcast/xfinity/sirius/api/api1Dot2/Sirius1Dot2.scala @@ -0,0 +1,35 @@ +/** + * Copyright 2014 Comcast Cable Communications Management, LLC + * + * 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. + */ +package com.comcast.xfinity.sirius.api.api1Dot2 + +import com.comcast.xfinity.sirius.api.{Sirius => Sirius1Dot1} + +/** + * Methods added to the abstract Sirius interface in the 1.2.x series release(s). + */ +trait Sirius1Dot2Extensions { + + /** + * Terminate this instance, including shutting down all internal running Actors. + */ + def shutdown(): Unit +} + +/** + * Enhanced abstract Sirius interface made available in the 1.2.x series release(s). + */ +trait Sirius1Dot2 extends Sirius1Dot1 with Sirius1Dot2Extensions +