Module: Ice

Defined in:
ruby/Ice/Proxy.rb,
ruby/Ice.rb,
ruby/Ice/Value.rb,
ruby/Ice/Router.rb,
ruby/Ice/Struct.rb,
ruby/Ice/Context.rb,
ruby/Ice/Locator.rb,
ruby/Ice/Process.rb,
ruby/Ice/Version.rb,
ruby/Ice/Identity.rb,
ruby/Ice/Exception.rb,
ruby/Ice/SliceUtil.rb,
ruby/Ice/ReplyStatus.rb,
ruby/Ice/PropertyDict.rb,
ruby/Ice/RemoteLogger.rb,
ruby/Ice/ToStringMode.rb,
ruby/Ice/CompressBatch.rb,
ruby/Ice/EndpointTypes.rb,
ruby/Ice/OperationMode.rb,
ruby/Ice/ProxyFunctions.rb,
ruby/Ice/LocalExceptions.rb,
ruby/Ice/LocatorRegistry.rb,
ruby/Ice/PropertiesAdmin.rb,
ruby/Ice/BuiltinSequences.rb,
ruby/Ice/IdentitySpaceship.rb,
ruby/Ice/SliceChecksumDict.rb,
ruby/Ice/InitializationData.rb,
ruby/Ice/EndpointSelectionType.rb

Overview

Copyright © ZeroC, Inc.

Defined Under Namespace

Modules: Inspect_mixin, LocatorFinderPrx_mixin, LocatorPrx_mixin, LocatorRegistryPrx_mixin, LoggerAdminPrx_mixin, ObjectPrx_mixin, ProcessPrx_mixin, PropertiesAdminPrx_mixin, Proxy_mixin, RemoteLoggerPrx_mixin, RouterFinderPrx_mixin, RouterPrx_mixin Classes: AdapterAlreadyActiveException, AdapterNotFoundException, AlreadyRegisteredException, CloseConnectionException, CloseTimeoutException, CommunicatorDestroyedException, CompressBatch, ConnectFailedException, ConnectTimeoutException, ConnectionAbortedException, ConnectionClosedException, ConnectionLostException, ConnectionRefusedException, DNSException, DatagramLimitException, DispatchException, EncodingVersion, EndpointSelectionType, Exception, FacetNotExistException, FeatureNotSupportedException, FixedProxyException, FormatType, Identity, InitializationData, InitializationException, InvalidReplicaGroupIdException, InvocationTimeoutException, LocalException, LocatorFinderPrx, LocatorPrx, LocatorRegistryPrx, LogMessage, LogMessageType, LoggerAdminPrx, MarshalException, NoEndpointException, NotRegisteredException, ObjectNotExistException, ObjectNotFoundException, ObjectPrx, OperationMode, OperationNotExistException, ParseException, PluginInitializationException, ProcessPrx, PropertiesAdminPrx, PropertyException, ProtocolException, ProtocolVersion, RemoteLoggerAlreadyAttachedException, RemoteLoggerPrx, ReplyStatus, RequestFailedException, RouterFinderPrx, RouterPrx, SecurityException, ServerNotFoundException, SliceInfo, SlicedData, SocketException, SyscallException, TimeoutException, ToStringMode, TwowayOnlyException, UnknownException, UnknownLocalException, UnknownSlicedValue, UnknownUserException, UserException, Value

Constant Summary collapse

Protocol_1_0 =
ProtocolVersion.new(1, 0)
Encoding_1_0 =
EncodingVersion.new(1, 0)
Encoding_1_1 =
EncodingVersion.new(1, 1)
T_ObjectPrx =
Ice.__declareProxy('::Ice::Object')
T_Value =
Ice.__declareClass('::Ice::Object')
T_UnknownSlicedValue =
Ice.__declareClass('::Ice::UnknownSlicedValue')
T_RouterPrx =
Ice::__declareProxy('::Ice::Router')
T_RouterFinderPrx =
Ice::__declareProxy('::Ice::RouterFinder')
T_Context =
Ice::__defineDictionary('::Ice::Context', Ice::T_string, Ice::T_string)
T_AdapterNotFoundException =
Ice::__defineException('::Ice::AdapterNotFoundException', AdapterNotFoundException, nil, [])
T_ObjectNotFoundException =
Ice::__defineException('::Ice::ObjectNotFoundException', ObjectNotFoundException, nil, [])
T_LocatorRegistryPrx =
Ice::__declareProxy('::Ice::LocatorRegistry')
T_LocatorPrx =
Ice::__declareProxy('::Ice::Locator')
T_LocatorFinderPrx =
Ice::__declareProxy('::Ice::LocatorFinder')
T_ProcessPrx =
Ice::__declareProxy('::Ice::Process')
T_ProtocolVersion =
Ice::__defineStruct('::Ice::ProtocolVersion', ProtocolVersion, [
    ["major", Ice::T_byte],
    ["minor", Ice::T_byte]
])
T_EncodingVersion =
Ice::__defineStruct('::Ice::EncodingVersion', EncodingVersion, [
    ["major", Ice::T_byte],
    ["minor", Ice::T_byte]
])
T_Identity =
Ice::__defineStruct('::Ice::Identity', Identity, [
    ["name", Ice::T_string],
    ["category", Ice::T_string]
])
T_IdentitySeq =
Ice::__defineSequence('::Ice::IdentitySeq', ::Ice::T_Identity)
T_ReplyStatus =
Ice::__defineEnum('::Ice::ReplyStatus', ReplyStatus, ReplyStatus::_enumerators)
T_PropertyDict =
Ice::__defineDictionary('::Ice::PropertyDict', Ice::T_string, Ice::T_string)
T_LogMessageType =
Ice::__defineEnum('::Ice::LogMessageType', LogMessageType, LogMessageType::_enumerators)
T_LogMessageTypeSeq =
Ice::__defineSequence('::Ice::LogMessageTypeSeq', ::Ice::T_LogMessageType)
T_LogMessage =
Ice::__defineStruct('::Ice::LogMessage', LogMessage, [
    ["type", ::Ice::T_LogMessageType],
    ["timestamp", Ice::T_long],
    ["traceCategory", Ice::T_string],
    ["message", Ice::T_string]
])
T_LogMessageSeq =
Ice::__defineSequence('::Ice::LogMessageSeq', ::Ice::T_LogMessage)
T_RemoteLoggerPrx =
Ice::__declareProxy('::Ice::RemoteLogger')
T_RemoteLoggerAlreadyAttachedException =
Ice::__defineException('::Ice::RemoteLoggerAlreadyAttachedException', RemoteLoggerAlreadyAttachedException, nil, [])
T_LoggerAdminPrx =
Ice::__declareProxy('::Ice::LoggerAdmin')
URIEndpointType =
0
TCPEndpointType =
1
SSLEndpointType =
2
UDPEndpointType =
3
WSEndpointType =
4
WSSEndpointType =
5
BTEndpointType =
6
BTSEndpointType =
7
IAPEndpointType =
8
IAPSEndpointType =
9
T_OperationMode =
Ice::__defineEnum('::Ice::OperationMode', OperationMode, OperationMode::_enumerators)
T_AdapterAlreadyActiveException =
Ice::__defineException('::Ice::AdapterAlreadyActiveException', AdapterAlreadyActiveException, nil, [])
T_InvalidReplicaGroupIdException =
Ice::__defineException('::Ice::InvalidReplicaGroupIdException', InvalidReplicaGroupIdException, nil, [])
T_ServerNotFoundException =
Ice::__defineException('::Ice::ServerNotFoundException', ServerNotFoundException, nil, [])
T_PropertiesAdminPrx =
Ice::__declareProxy('::Ice::PropertiesAdmin')
T_BoolSeq =
Ice::__defineSequence('::Ice::BoolSeq', Ice::T_bool)
T_ByteSeq =
Ice::__defineSequence('::Ice::ByteSeq', Ice::T_byte)
T_ShortSeq =
Ice::__defineSequence('::Ice::ShortSeq', Ice::T_short)
T_IntSeq =
Ice::__defineSequence('::Ice::IntSeq', Ice::T_int)
T_LongSeq =
Ice::__defineSequence('::Ice::LongSeq', Ice::T_long)
T_FloatSeq =
Ice::__defineSequence('::Ice::FloatSeq', Ice::T_float)
T_DoubleSeq =
Ice::__defineSequence('::Ice::DoubleSeq', Ice::T_double)
T_StringSeq =
Ice::__defineSequence('::Ice::StringSeq', Ice::T_string)
T_ObjectSeq =
Ice::__defineSequence('::Ice::ObjectSeq', Ice::T_Value)
T_ObjectProxySeq =
Ice::__defineSequence('::Ice::ObjectProxySeq', Ice::T_ObjectPrx)
T_SliceChecksumDict =
Ice::__defineDictionary('::Ice::SliceChecksumDict', Ice::T_string, Ice::T_string)

Class Method Summary collapse

Class Method Details

.getSliceDirObject

Convenience function for locating the directory containing the Slice files.



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# File 'ruby/Ice/SliceUtil.rb', line 6

def Ice.getSliceDir

    # Get the grand-parent of the directory containing this file (Ice/SliceUtil.rb).
    rbHome = File::join(File::dirname(__FILE__), "../..")

    # For an installation from a source distribution, a binary tarball, the "slice" directory is a sibling of the
    # "ruby" directory.
    dir = File::join(rbHome, "slice")
    if File::exist?(dir)
        return File::expand_path(dir)
    end

    # In a source distribution, the "slice" directory is one level higher.
    dir = File::join(rbHome, "..", "slice")
    if File::exist?(dir)
        return File::expand_path(dir)
    end

    # Gem distribution
    dir = File::join(rbHome, "..", "dist", "ice", "slice")
    if File::exist?(dir)
        return File::expand_path(dir)
    end

    if RUBY_PLATFORM =~ /linux/i

        # Check the default Linux location.
        dir = File::join("/", "usr", "share", "ice", "slice")
        if File::exist?(dir)
            return dir
        end
    end

    return nil
end

.proxyIdentityAndFacetCompare(lhs, rhs) ⇒ Object



74
75
76
77
78
79
80
# File 'ruby/Ice/Proxy.rb', line 74

def Ice.proxyIdentityAndFacetCompare(lhs, rhs)
    n = proxyIdentityCompare(lhs, rhs)
    if n == 0 && lhs && rhs
        n = lhs.ice_getFacet() <=> rhs.ice_getFacet()
    end
    return n
end

.proxyIdentityAndFacetEqual(lhs, rhs) ⇒ Object



82
83
84
# File 'ruby/Ice/Proxy.rb', line 82

def Ice.proxyIdentityAndFacetEqual(lhs, rhs)
    return proxyIdentityAndFacetCompare(lhs, rhs) == 0
end

.proxyIdentityCompare(lhs, rhs) ⇒ Object

Proxy comparison functions.



55
56
57
58
59
60
61
62
63
64
65
66
67
68
# File 'ruby/Ice/Proxy.rb', line 55

def Ice.proxyIdentityCompare(lhs, rhs)
  if (lhs && !lhs.is_a?(ObjectPrx)) || (rhs && !rhs.is_a?(ObjectPrx))
      raise TypeError, 'argument is not a proxy'
  end
  if lhs.nil? && rhs.nil?
      return 0
  elsif lhs.nil? && rhs
      return -1
  elsif lhs && rhs.nil?
      return 1
  else
      return lhs.ice_getIdentity() <=> rhs.ice_getIdentity()
  end
end

.proxyIdentityEqual(lhs, rhs) ⇒ Object



70
71
72
# File 'ruby/Ice/Proxy.rb', line 70

def Ice.proxyIdentityEqual(lhs, rhs)
    return proxyIdentityCompare(lhs, rhs) == 0
end