gnu.CORBA.CDR

Class gnuRuntime

Implemented Interfaces:
IDLEntity, Object, RunTime, RunTimeOperations, Serializable

public class gnuRuntime
extends LocalObject
implements RunTime

Our implementation of the sending context runtime.

Field Summary

Serializable
target
The pre-created instance of the object being written (avoid re-instantiation).

Constructor Summary

gnuRuntime(String a_codebase, Object a_target)
Create Runtime.

Method Summary

void
addCodeBase(String base)
Set the codebase, preserving the old value if the passed parameter is null and forming the space delimited list if both new and old values are not null.
String
dump()
Dump all objects that are currently stored.
String
getCodeBase()
Get the codebase.
int
idWrittenAt(Object x)
Check if the object is already written.
Object
isObjectWrittenAt(int x, int offset)
Get the object, written at the given position.
int
isWrittenAt(Object x)
Check if the object is already written.
void
multipleIdsWritten(String[] ids, int at)
Mark the given object as written at the given position.
void
objectWritten(Object object, int at)
Mark the given object as written at the given position.
void
redirect(int p_searched, int p_present)
Set redirection, indicating that the object, searched at the p_searched position can be actually found at the p_present position.
void
singleIdWritten(String id, int at)
Mark the given object as written at the given position.

Methods inherited from class org.omg.CORBA.LocalObject

_create_request, _create_request, _duplicate, _get_domain_managers, _get_interface, _get_interface_def, _get_policy, _hash, _invoke, _is_a, _is_equivalent, _is_local, _non_existent, _orb, _release, _releaseReply, _request, _request, _servant_postinvoke, _set_policy_override, validate_connection

Methods inherited from class java.lang.Object

clone, equals, extends Object> getClass, finalize, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Details

target

public Serializable target
The pre-created instance of the object being written (avoid re-instantiation).

Constructor Details

gnuRuntime

public gnuRuntime(String a_codebase,
                  Object a_target)
Create Runtime.
Parameters:
a_codebase - a codebase, if it was specified in the stream.

Method Details

addCodeBase

public void addCodeBase(String base)
Set the codebase, preserving the old value if the passed parameter is null and forming the space delimited list if both new and old values are not null.

dump

public String dump()
Dump all objects that are currently stored.

getCodeBase

public String getCodeBase()
Get the codebase.

idWrittenAt

public int idWrittenAt(Object x)
Check if the object is already written.
Returns:
the position, at that the object is allready written or -1 if it is not yet written.

isObjectWrittenAt

public Object isObjectWrittenAt(int x,
                                int offset)
Get the object, written at the given position. This returs both shared objects and repository Ids.
Returns:
the position, at that the object is allready written.
Throws:
MARSHAL - if there is no object written at that position.

isWrittenAt

public int isWrittenAt(Object x)
Check if the object is already written.
Returns:
the position, at that the object is allready written or -1 if it is not yet written.

multipleIdsWritten

public void multipleIdsWritten(String[] ids,
                               int at)
Mark the given object as written at the given position.

objectWritten

public void objectWritten(Object object,
                          int at)
Mark the given object as written at the given position.

redirect

public void redirect(int p_searched,
                     int p_present)
Set redirection, indicating that the object, searched at the p_searched position can be actually found at the p_present position.

singleIdWritten

public void singleIdWritten(String id,
                            int at)
Mark the given object as written at the given position.

gnuRuntime.java -- Copyright (C) 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GNU Classpath; see the file COPYING. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Linking this library statically or dynamically with other modules is making a combined work based on this library. Thus, the terms and conditions of the GNU General Public License cover the whole combination. As a special exception, the copyright holders of this library give you permission to link this library with independent modules to produce an executable, regardless of the license terms of these independent modules, and to copy and distribute the resulting executable under terms of your choice, provided that you also meet, for each linked independent module, the terms and conditions of the license of that module. An independent module is a module which is not derived from or based on this library. If you modify this library, you may extend this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version.