/*
 * @(#)AssertionServiceImpl_Stub.java
 *
 * Copyright 2006 Sony Corporation
 */

package info.dragonlady.cluster;

import java.rmi.RemoteException;

/**
 * アサーション情報をクラスタリングサーバ間で共有する為のクライアント側スタブクラス。
 * 
 * RMIコンパイラによる自動生成ファイル。
 * 
 * @author Hiroshi.Ebata(INFOCITY)
 * @version $Revision: 1.2 $ $Date: 2006/03/10 14:28:48 $
 */
public final class AssertionServiceImpl_Stub
    extends java.rmi.server.RemoteStub
    implements info.dragonlady.cluster.AssertionService, java.rmi.Remote
{
    private static final java.rmi.server.Operation[] operations = {
	new java.rmi.server.Operation("java.util.Map getAssertionMap()"),
	new java.rmi.server.Operation("java.util.Map getHandleMap()"),
	new java.rmi.server.Operation("void put(java.lang.String, java.lang.String, java.lang.String)"),
	new java.rmi.server.Operation("void removeByHandle(byte[])"),
	new java.rmi.server.Operation("void removeById(java.lang.String)"),
	new java.rmi.server.Operation("void setAssertionMap(java.util.Map)"),
	new java.rmi.server.Operation("void setHandleMap(java.util.Map)")
    };
    
    private static final long interfaceHash = 2977008960879578824L;
    
    private static final long serialVersionUID = 2;
    
    private static boolean useNewInvoke;
    private static java.lang.reflect.Method $method_getAssertionMap_0;
    private static java.lang.reflect.Method $method_getHandleMap_1;
    private static java.lang.reflect.Method $method_put_2;
    private static java.lang.reflect.Method $method_removeByHandle_3;
    private static java.lang.reflect.Method $method_removeById_4;
    private static java.lang.reflect.Method $method_setAssertionMap_5;
    private static java.lang.reflect.Method $method_setHandleMap_6;
    
    static {
	try {
	    java.rmi.server.RemoteRef.class.getMethod("invoke",
		new java.lang.Class[] {
		    java.rmi.Remote.class,
		    java.lang.reflect.Method.class,
		    java.lang.Object[].class,
		    long.class
		});
	    useNewInvoke = true;
	    $method_getAssertionMap_0 = info.dragonlady.cluster.AssertionService.class.getMethod("getAssertionMap", new java.lang.Class[] {});
	    $method_getHandleMap_1 = info.dragonlady.cluster.AssertionService.class.getMethod("getHandleMap", new java.lang.Class[] {});
	    $method_put_2 = info.dragonlady.cluster.AssertionService.class.getMethod("put", new java.lang.Class[] {java.lang.String.class, java.lang.String.class, java.lang.String.class});
	    $method_removeByHandle_3 = info.dragonlady.cluster.AssertionService.class.getMethod("removeByHandle", new java.lang.Class[] {byte[].class});
	    $method_removeById_4 = info.dragonlady.cluster.AssertionService.class.getMethod("removeById", new java.lang.Class[] {java.lang.String.class});
	    $method_setAssertionMap_5 = info.dragonlady.cluster.AssertionService.class.getMethod("setAssertionMap", new java.lang.Class[] {java.util.Map.class});
	    $method_setHandleMap_6 = info.dragonlady.cluster.AssertionService.class.getMethod("setHandleMap", new java.lang.Class[] {java.util.Map.class});
	} catch (java.lang.NoSuchMethodException e) {
	    useNewInvoke = false;
	}
    }
    
    /**
     * コンストラクタ。
     */
    public AssertionServiceImpl_Stub() {
	super();
    }
    /**
     * コンストラクタ。
     * 
     * @param ref リモート参照
     */
    public AssertionServiceImpl_Stub(java.rmi.server.RemoteRef ref) {
	super(ref);
    }
    
    // methods from remote interfaces
    
	/**
	 * アサーションマップ取得。
	 * 
	 * @return Map アサーションマップ
	 * @throws RemoteException
     * @see info.dragonlady.cluster.AssertionService#getAssertionMap()
     */
    public java.util.Map getAssertionMap()
	throws java.rmi.RemoteException
    {
	try {
	    if (useNewInvoke) {
		Object $result = ref.invoke(this, $method_getAssertionMap_0, null, 4132266474547421113L);
		return ((java.util.Map) $result);
	    } else {
		java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 0, interfaceHash);
		ref.invoke(call);
		java.util.Map $result;
		try {
		    java.io.ObjectInput in = call.getInputStream();
		    $result = (java.util.Map) in.readObject();
		} catch (java.io.IOException e) {
		    throw new java.rmi.UnmarshalException("error unmarshalling return", e);
		} catch (java.lang.ClassNotFoundException e) {
		    throw new java.rmi.UnmarshalException("error unmarshalling return", e);
		} finally {
		    ref.done(call);
		}
		return $result;
	    }
	} catch (java.lang.RuntimeException e) {
	    throw e;
	} catch (java.rmi.RemoteException e) {
	    throw e;
	} catch (java.lang.Exception e) {
	    throw new java.rmi.UnexpectedException("undeclared checked exception", e);
	}
    }
    
	/**
	 * アサーションハンドルマップ取得。
	 * 
	 * @return Map アサーションハンドルマップ
	 * @throws RemoteException
     * @see info.dragonlady.cluster.AssertionService#getHandleMap()
     */
    public java.util.Map getHandleMap()
	throws java.rmi.RemoteException
    {
	try {
	    if (useNewInvoke) {
		Object $result = ref.invoke(this, $method_getHandleMap_1, null, 7206961570099350643L);
		return ((java.util.Map) $result);
	    } else {
		java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 1, interfaceHash);
		ref.invoke(call);
		java.util.Map $result;
		try {
		    java.io.ObjectInput in = call.getInputStream();
		    $result = (java.util.Map) in.readObject();
		} catch (java.io.IOException e) {
		    throw new java.rmi.UnmarshalException("error unmarshalling return", e);
		} catch (java.lang.ClassNotFoundException e) {
		    throw new java.rmi.UnmarshalException("error unmarshalling return", e);
		} finally {
		    ref.done(call);
		}
		return $result;
	    }
	} catch (java.lang.RuntimeException e) {
	    throw e;
	} catch (java.rmi.RemoteException e) {
	    throw e;
	} catch (java.lang.Exception e) {
	    throw new java.rmi.UnexpectedException("undeclared checked exception", e);
	}
    }
    
	/**
	 * 指定ID、アサーションハンドル、アサーションのマッピングを設定。
	 * 
	 * @param $param_String_1 ID
	 * @param $param_String_2 アサーションハンドル
	 * @param $param_String_3 アサーション
	 * @throws RemoteException
     * @see info.dragonlady.cluster.AssertionService#put(java.lang.String, java.lang.String, java.lang.String)
     */
    public void put(java.lang.String $param_String_1, java.lang.String $param_String_2, java.lang.String $param_String_3)
	throws java.rmi.RemoteException
    {
	try {
	    if (useNewInvoke) {
		ref.invoke(this, $method_put_2, new java.lang.Object[] {$param_String_1, $param_String_2, $param_String_3}, -4725095406060374831L);
	    } else {
		java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 2, interfaceHash);
		try {
		    java.io.ObjectOutput out = call.getOutputStream();
		    out.writeObject($param_String_1);
		    out.writeObject($param_String_2);
		    out.writeObject($param_String_3);
		} catch (java.io.IOException e) {
		    throw new java.rmi.MarshalException("error marshalling arguments", e);
		}
		ref.invoke(call);
		ref.done(call);
	    }
	} catch (java.lang.RuntimeException e) {
	    throw e;
	} catch (java.rmi.RemoteException e) {
	    throw e;
	} catch (java.lang.Exception e) {
	    throw new java.rmi.UnexpectedException("undeclared checked exception", e);
	}
    }
    
	/**
	 * 指定ハンドルをキーとするアサーション、アサーションハンドルのマッピングを削除。
	 * 
	 * @param $param_arrayOf_byte_1 アサーションハンドル
	 * @throws RemoteException
     * @see info.dragonlady.cluster.AssertionService#removeByHandle(byte[])
     */
    public void removeByHandle(byte[] $param_arrayOf_byte_1)
	throws java.rmi.RemoteException
    {
	try {
	    if (useNewInvoke) {
		ref.invoke(this, $method_removeByHandle_3, new java.lang.Object[] {$param_arrayOf_byte_1}, -7092462798648667000L);
	    } else {
		java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 3, interfaceHash);
		try {
		    java.io.ObjectOutput out = call.getOutputStream();
		    out.writeObject($param_arrayOf_byte_1);
		} catch (java.io.IOException e) {
		    throw new java.rmi.MarshalException("error marshalling arguments", e);
		}
		ref.invoke(call);
		ref.done(call);
	    }
	} catch (java.lang.RuntimeException e) {
	    throw e;
	} catch (java.rmi.RemoteException e) {
	    throw e;
	} catch (java.lang.Exception e) {
	    throw new java.rmi.UnexpectedException("undeclared checked exception", e);
	}
    }
    
	/**
	 * 指定IDをキーとするアサーション、アサーションハンドルのマッピングを削除。
	 * 
	 * @param $param_String_1 ID
	 * @throws RemoteException
     * @see info.dragonlady.cluster.AssertionService#removeById(java.lang.String)
     */
    public void removeById(java.lang.String $param_String_1)
	throws java.rmi.RemoteException
    {
	try {
	    if (useNewInvoke) {
		ref.invoke(this, $method_removeById_4, new java.lang.Object[] {$param_String_1}, 2501449104363933774L);
	    } else {
		java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 4, interfaceHash);
		try {
		    java.io.ObjectOutput out = call.getOutputStream();
		    out.writeObject($param_String_1);
		} catch (java.io.IOException e) {
		    throw new java.rmi.MarshalException("error marshalling arguments", e);
		}
		ref.invoke(call);
		ref.done(call);
	    }
	} catch (java.lang.RuntimeException e) {
	    throw e;
	} catch (java.rmi.RemoteException e) {
	    throw e;
	} catch (java.lang.Exception e) {
	    throw new java.rmi.UnexpectedException("undeclared checked exception", e);
	}
    }
    
	/**
	 * アサーションマップ設定。
	 * 
	 * @param $param_Map_1 アサーションマップ
	 * @throws RemoteException
     * @see info.dragonlady.cluster.AssertionService#setAssertionMap(java.util.Map)
     */
    public void setAssertionMap(java.util.Map $param_Map_1)
	throws java.rmi.RemoteException
    {
	try {
	    if (useNewInvoke) {
		ref.invoke(this, $method_setAssertionMap_5, new java.lang.Object[] {$param_Map_1}, -3178874101328097306L);
	    } else {
		java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 5, interfaceHash);
		try {
		    java.io.ObjectOutput out = call.getOutputStream();
		    out.writeObject($param_Map_1);
		} catch (java.io.IOException e) {
		    throw new java.rmi.MarshalException("error marshalling arguments", e);
		}
		ref.invoke(call);
		ref.done(call);
	    }
	} catch (java.lang.RuntimeException e) {
	    throw e;
	} catch (java.rmi.RemoteException e) {
	    throw e;
	} catch (java.lang.Exception e) {
	    throw new java.rmi.UnexpectedException("undeclared checked exception", e);
	}
    }
    
	/**
	 * アサーションハンドルマップ設定。
	 * 
	 * @param $param_Map_1 アサーションハンドルマップ
	 * @throws RemoteException
     * @see info.dragonlady.cluster.AssertionService#setHandleMap(java.util.Map)
     */
    public void setHandleMap(java.util.Map $param_Map_1)
	throws java.rmi.RemoteException
    {
	try {
	    if (useNewInvoke) {
		ref.invoke(this, $method_setHandleMap_6, new java.lang.Object[] {$param_Map_1}, 7559993770237421800L);
	    } else {
		java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 6, interfaceHash);
		try {
		    java.io.ObjectOutput out = call.getOutputStream();
		    out.writeObject($param_Map_1);
		} catch (java.io.IOException e) {
		    throw new java.rmi.MarshalException("error marshalling arguments", e);
		}
		ref.invoke(call);
		ref.done(call);
	    }
	} catch (java.lang.RuntimeException e) {
	    throw e;
	} catch (java.rmi.RemoteException e) {
	    throw e;
	} catch (java.lang.Exception e) {
	    throw new java.rmi.UnexpectedException("undeclared checked exception", e);
	}
    }
}
