| ## Copyright 2007-2008 Cisco Systems Inc. |
| ## |
| ## 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. |
| // This file automatically generated by: |
| // $version |
| // $now |
| // This file is automatically created and should not be edited! |
| // Re-implement these methods by overriding them in Impl$intf.name()$suffix. |
| #set($i = $intf.name()) |
| #set($intfname = "$i$suffix") |
| #set($clname = "Base$intfname") |
| #if ($helper.isServer($mc)) |
| #set($peer = "client") |
| #else |
| #set($peer = "server") |
| #end |
| |
| package $intf.parent().name(); |
| |
| import org.apache.etch.bindings.java.support.ObjSession; |
| |
| #foreach( $n in $intf.iterator() ) |
| #if ($n.isExtern()) |
| #if ($n.hasImport( $helper )) |
| import $n.getImport( $helper ); |
| #end |
| #end |
| #end |
| |
| /** |
| * Base implementation of $intfname, with default method implementations |
| * which throw UnsupportedOperationException. Extend this class to provide |
| * implementations of messages from the $peer. |
| * |
| * @see Impl$intfname |
| */ |
| public class $clname implements $intfname, ObjSession |
| { |
| public Object _sessionQuery( Object query ) throws Exception |
| { |
| throw new UnsupportedOperationException( "unknown query: "+query ); |
| } |
| |
| public void _sessionControl( Object control, Object value ) throws Exception |
| { |
| throw new UnsupportedOperationException( "unknown control: "+control ); |
| } |
| |
| public void _sessionNotify( Object event ) throws Exception |
| { |
| if (event instanceof Throwable) |
| ((Throwable) event).printStackTrace(); |
| } |
| #foreach ($mthd in $intf.iterator()) |
| #if ($mthd.isMsgDir($mc) || $mthd.isMsgDirBoth()) |
| #if (!$mthd.isHidden()) |
| #if(!$methodList.contains($mthd.name().name())) |
| #set ( $addMethodListStatus = $methodList.add($mthd.name().name()) ) |
| |
| public $helper.getTypeName( $mthd.type() ) $mthd.name() |
| ( |
| #set( $sep = "" ) |
| #foreach( $param in $mthd.iterator() ) |
| $sep$helper.getTypeName( $param.type() ) $param.name() |
| #set( $sep = ", " ) |
| #end |
| ) |
| #if($mthd.hasThrown()) |
| throws |
| #set( $sep = "" ) |
| #foreach($t in $mthd.thrown().iterator()) |
| $sep$t.getNamed().fqname() |
| #set( $sep = ", " ) |
| #end |
| #end |
| { |
| throw new UnsupportedOperationException( "$mthd.name()" ); |
| } |
| #end |
| #end |
| #end |
| #end |
| #foreach( $x in $intf.iterator() ) |
| #if( $x.isMixin() ) |
| #set( $m = $x.getModule() ) |
| #set( $z = $m.iterator().next() ) |
| #foreach( $n in $z.messages( true ) ) |
| #if($n.isMsgDir($mc) || $n.isMsgDirBoth() ) |
| #if(!$n.isHidden()) |
| #if(!$methodList.contains($n.name().name())) |
| #set ( $addMethodListStatus = $methodList.add($n.name().name()) ) |
| #if($n.isOneway()) |
| |
| public $helper.getTypeName( $n.type() ) $n.name() |
| ( |
| #set( $sep = "" ) |
| #foreach( $p in $n.iterator() ) |
| $sep$helper.getTypeName( $p.type() ) $p.name() |
| #set( $sep = ", " ) |
| #end |
| ) |
| { |
| throw new UnsupportedOperationException( "$n.name()" ); |
| } |
| #else |
| |
| public $helper.getTypeName( $n.type() ) $n.name() |
| ( |
| #set( $sep = "" ) |
| #foreach( $p in $n.iterator() ) |
| $sep$helper.getTypeName( $p.type() ) $p.name() |
| #set( $sep = ", " ) |
| #end |
| ) |
| #if($n.hasThrown()) |
| throws |
| #set( $sep = "" ) |
| #foreach($t in $n.thrown().iterator()) |
| $sep$t.getNamed().fqname() |
| #set( $sep = ", " ) |
| #end |
| #end |
| { |
| throw new UnsupportedOperationException( "$n.name()" ); |
| } |
| #end |
| #end |
| #end |
| #end |
| #end |
| #end |
| #end |
| } |