001: /***** Copyright (c) 2000 Object Management Group. Unlimited rights to
002: duplicate and use this code are hereby granted provided that this
003: copyright notice is included.
004:
005: Change history: modified toString, hashCode, equals per Java 2k RTF
006: - 15 Jan 2000
007: - Jeff Mischkinsky (jeff@persistence.com, jeff_mischkinsky@omg.org)
008: *****/package org.omg.CORBA.portable;
009:
010: abstract public class ObjectImpl implements org.omg.CORBA.Object {
011:
012: private transient Delegate __delegate;
013:
014: public Delegate _get_delegate() {
015: if (__delegate == null)
016: throw new org.omg.CORBA.BAD_OPERATION();
017: return __delegate;
018: }
019:
020: public void _set_delegate(Delegate delegate) {
021: __delegate = delegate;
022: }
023:
024: public abstract String[] _ids();
025:
026: /**
027: *@deprecated Deprecated by CORBA 2.3
028: */
029: public org.omg.CORBA.InterfaceDef _get_interface() {
030: return _get_delegate().get_interface(this );
031: }
032:
033: public org.omg.CORBA.Object _get_interface_def() {
034: return _get_delegate().get_interface_def(this );
035: }
036:
037: public org.omg.CORBA.Object _duplicate() {
038: return _get_delegate().duplicate(this );
039: }
040:
041: public void _release() {
042: _get_delegate().release(this );
043: }
044:
045: public boolean _is_a(String repository_id) {
046: return _get_delegate().is_a(this , repository_id);
047: }
048:
049: public boolean _is_equivalent(org.omg.CORBA.Object that) {
050: return _get_delegate().is_equivalent(this , that);
051: }
052:
053: public boolean _non_existent() {
054: return _get_delegate().non_existent(this );
055: }
056:
057: public org.omg.CORBA.Object _get_component() {
058: return _get_delegate().get_component(this );
059: }
060:
061: public int _hash(int maximum) {
062: return _get_delegate().hash(this , maximum);
063: }
064:
065: public org.omg.CORBA.Request _request(String operation) {
066: return _get_delegate().request(this , operation);
067: }
068:
069: public org.omg.CORBA.portable.OutputStream _request(
070: String operation, boolean responseExpected) {
071: return _get_delegate().request(this , operation,
072: responseExpected);
073: }
074:
075: public org.omg.CORBA.portable.InputStream _invoke(
076: org.omg.CORBA.portable.OutputStream output)
077: throws ApplicationException, RemarshalException {
078: return _get_delegate().invoke(this , output);
079: }
080:
081: public void _releaseReply(org.omg.CORBA.portable.InputStream input) {
082: _get_delegate().releaseReply(this , input);
083: }
084:
085: public org.omg.CORBA.Request _create_request(
086: org.omg.CORBA.Context ctx, String operation,
087: org.omg.CORBA.NVList arg_list,
088: org.omg.CORBA.NamedValue result) {
089: return _get_delegate().create_request(this , ctx, operation,
090: arg_list, result);
091: }
092:
093: public org.omg.CORBA.Request _create_request(
094: org.omg.CORBA.Context ctx, String operation,
095: org.omg.CORBA.NVList arg_list,
096: org.omg.CORBA.NamedValue result,
097: org.omg.CORBA.ExceptionList exceptions,
098: org.omg.CORBA.ContextList contexts) {
099: return _get_delegate().create_request(this , ctx, operation,
100: arg_list, result, exceptions, contexts);
101: }
102:
103: public org.omg.CORBA.Policy _get_policy(int policy_type) {
104: return _get_delegate().get_policy(this , policy_type);
105: }
106:
107: public org.omg.CORBA.DomainManager[] _get_domain_managers() {
108: return _get_delegate().get_domain_managers(this );
109: }
110:
111: public org.omg.CORBA.Object _set_policy_override(
112: org.omg.CORBA.Policy[] policies,
113: org.omg.CORBA.SetOverrideType set_add) {
114: return _get_delegate().set_policy_override(this , policies,
115: set_add);
116: }
117:
118: public org.omg.CORBA.ORB _orb() {
119: return _get_delegate().orb(this );
120: }
121:
122: public boolean _is_local() {
123: return _get_delegate().is_local(this );
124: }
125:
126: public ServantObject _servant_preinvoke(String operation,
127: Class expectedType) {
128: return _get_delegate().servant_preinvoke(this , operation,
129: expectedType);
130: }
131:
132: public void _servant_postinvoke(ServantObject servant) {
133: _get_delegate().servant_postinvoke(this , servant);
134: }
135:
136: public String toString() {
137: if (__delegate != null)
138: return __delegate.toString(this );
139: else
140: return getClass().getName() + ":no delegate set";
141: }
142:
143: public int hashCode() {
144: if (__delegate != null)
145: return __delegate.hashCode(this );
146: else
147: return System.identityHashCode(this );
148: }
149:
150: public boolean equals(java.lang.Object obj) {
151: if (__delegate != null)
152: return __delegate.equals(this, obj);
153: else
154: return (this == obj);
155: }
156: }
|