ice_oneway
, ice_batchOneway
, ice_datagram
,
* or ice_batchDatagram
and the operation has a return value,
* out-parameters, or an exception specification.
*
**/
Ice.TwowayOnlyException = class extends Ice.LocalException
{
constructor(operation = "", _cause = "")
{
super(_cause);
this.operation = operation;
}
static get _parent()
{
return Ice.LocalException;
}
static get _id()
{
return "::Ice::TwowayOnlyException";
}
};
/**
* An attempt was made to clone a class that does not support
* cloning.
*
* This exception is raised if ice_clone
is called on
* a class that is derived from an abstract Slice class (that is,
* a class containing operations), and the derived class does not
* provide an implementation of the ice_clone
operation (C++ only).
*
**/
Ice.CloneNotImplementedException = class extends Ice.LocalException
{
constructor(_cause = "")
{
super(_cause);
}
static get _parent()
{
return Ice.LocalException;
}
static get _id()
{
return "::Ice::CloneNotImplementedException";
}
};
/**
* This exception is raised if an operation call on a server raises an
* unknown exception. For example, for C++, this exception is raised
* if the server throws a C++ exception that is not directly or
* indirectly derived from Ice::LocalException
or
* Ice::UserException
.
*
**/
Ice.UnknownException = class extends Ice.LocalException
{
constructor(unknown = "", _cause = "")
{
super(_cause);
this.unknown = unknown;
}
static get _parent()
{
return Ice.LocalException;
}
static get _id()
{
return "::Ice::UnknownException";
}
};
/**
* This exception is raised if an operation call on a server raises a
* local exception. Because local exceptions are not transmitted by
* the Ice protocol, the client receives all local exceptions raised
* by the server as {@link UnknownLocalException}. The only exception to this
* rule are all exceptions derived from {@link RequestFailedException},
* which are transmitted by the Ice protocol even though they are
* declared local
.
*
**/
Ice.UnknownLocalException = class extends Ice.UnknownException
{
constructor(unknown, _cause = "")
{
super(unknown, _cause);
}
static get _parent()
{
return Ice.UnknownException;
}
static get _id()
{
return "::Ice::UnknownLocalException";
}
};
/**
* An operation raised an incorrect user exception.
*
* This exception is raised if an operation raises a
* user exception that is not declared in the exception's
* throws
clause. Such undeclared exceptions are
* not transmitted from the server to the client by the Ice
* protocol, but instead the client just gets an
* {@link UnknownUserException}. This is necessary in order to not violate
* the contract established by an operation's signature: Only local
* exceptions and user exceptions declared in the
* throws
clause can be raised.
*
**/
Ice.UnknownUserException = class extends Ice.UnknownException
{
constructor(unknown, _cause = "")
{
super(unknown, _cause);
}
static get _parent()
{
return Ice.UnknownException;
}
static get _id()
{
return "::Ice::UnknownUserException";
}
};
/**
* This exception is raised if the Ice library version does not match
* the version in the Ice header files.
*
**/
Ice.VersionMismatchException = class extends Ice.LocalException
{
constructor(_cause = "")
{
super(_cause);
}
static get _parent()
{
return Ice.LocalException;
}
static get _id()
{
return "::Ice::VersionMismatchException";
}
};
/**
* This exception is raised if the {@link Communicator} has been destroyed.
*
* @see Communicator#destroy
*
**/
Ice.CommunicatorDestroyedException = class extends Ice.LocalException
{
constructor(_cause = "")
{
super(_cause);
}
static get _parent()
{
return Ice.LocalException;
}
static get _id()
{
return "::Ice::CommunicatorDestroyedException";
}
};
/**
* This exception is raised if an attempt is made to use a deactivated
* {@link ObjectAdapter}.
*
* @see ObjectAdapter#deactivate
* @see Communicator#shutdown
*
**/
Ice.ObjectAdapterDeactivatedException = class extends Ice.LocalException
{
constructor(name = "", _cause = "")
{
super(_cause);
this.name = name;
}
static get _parent()
{
return Ice.LocalException;
}
static get _id()
{
return "::Ice::ObjectAdapterDeactivatedException";
}
};
/**
* This exception is raised if an {@link ObjectAdapter} cannot be activated.
*
* This happens if the {@link Locator} detects another active {@link ObjectAdapter} with
* the same adapter id.
*
**/
Ice.ObjectAdapterIdInUseException = class extends Ice.LocalException
{
constructor(id = "", _cause = "")
{
super(_cause);
this.id = id;
}
static get _parent()
{
return Ice.LocalException;
}
static get _id()
{
return "::Ice::ObjectAdapterIdInUseException";
}
};
/**
* This exception is raised if no suitable endpoint is available.
*
**/
Ice.NoEndpointException = class extends Ice.LocalException
{
constructor(proxy = "", _cause = "")
{
super(_cause);
this.proxy = proxy;
}
static get _parent()
{
return Ice.LocalException;
}
static get _id()
{
return "::Ice::NoEndpointException";
}
};
/**
* This exception is raised if there was an error while parsing an
* endpoint.
*
**/
Ice.EndpointParseException = class extends Ice.LocalException
{
constructor(str = "", _cause = "")
{
super(_cause);
this.str = str;
}
static get _parent()
{
return Ice.LocalException;
}
static get _id()
{
return "::Ice::EndpointParseException";
}
};
/**
* This exception is raised if there was an error while parsing an
* endpoint selection type.
*
**/
Ice.EndpointSelectionTypeParseException = class extends Ice.LocalException
{
constructor(str = "", _cause = "")
{
super(_cause);
this.str = str;
}
static get _parent()
{
return Ice.LocalException;
}
static get _id()
{
return "::Ice::EndpointSelectionTypeParseException";
}
};
/**
* This exception is raised if there was an error while parsing a
* version.
*
**/
Ice.VersionParseException = class extends Ice.LocalException
{
constructor(str = "", _cause = "")
{
super(_cause);
this.str = str;
}
static get _parent()
{
return Ice.LocalException;
}
static get _id()
{
return "::Ice::VersionParseException";
}
};
/**
* This exception is raised if there was an error while parsing a
* stringified identity.
*
**/
Ice.IdentityParseException = class extends Ice.LocalException
{
constructor(str = "", _cause = "")
{
super(_cause);
this.str = str;
}
static get _parent()
{
return Ice.LocalException;
}
static get _id()
{
return "::Ice::IdentityParseException";
}
};
/**
* This exception is raised if there was an error while parsing a
* stringified proxy.
*
**/
Ice.ProxyParseException = class extends Ice.LocalException
{
constructor(str = "", _cause = "")
{
super(_cause);
this.str = str;
}
static get _parent()
{
return Ice.LocalException;
}
static get _id()
{
return "::Ice::ProxyParseException";
}
};
/**
* This exception is raised if an illegal identity is encountered.
*
**/
Ice.IllegalIdentityException = class extends Ice.LocalException
{
constructor(id = new Ice.Identity(), _cause = "")
{
super(_cause);
this.id = id;
}
static get _parent()
{
return Ice.LocalException;
}
static get _id()
{
return "::Ice::IllegalIdentityException";
}
};
/**
* This exception is raised to reject an illegal servant (typically
* a null servant)
*
**/
Ice.IllegalServantException = class extends Ice.LocalException
{
constructor(reason = "", _cause = "")
{
super(_cause);
this.reason = reason;
}
static get _parent()
{
return Ice.LocalException;
}
static get _id()
{
return "::Ice::IllegalServantException";
}
};
/**
* This exception is raised if a request failed. This exception, and
* all exceptions derived from {@link RequestFailedException}, are
* transmitted by the Ice protocol, even though they are declared
* local
.
*
**/
Ice.RequestFailedException = class extends Ice.LocalException
{
constructor(id = new Ice.Identity(), facet = "", operation = "", _cause = "")
{
super(_cause);
this.id = id;
this.facet = facet;
this.operation = operation;
}
static get _parent()
{
return Ice.LocalException;
}
static get _id()
{
return "::Ice::RequestFailedException";
}
};
/**
* This exception is raised if an object does not exist on the server,
* that is, if no facets with the given identity exist.
*
**/
Ice.ObjectNotExistException = class extends Ice.RequestFailedException
{
constructor(id, facet, operation, _cause = "")
{
super(id, facet, operation, _cause);
}
static get _parent()
{
return Ice.RequestFailedException;
}
static get _id()
{
return "::Ice::ObjectNotExistException";
}
};
/**
* This exception is raised if no facet with the given name exists,
* but at least one facet with the given identity exists.
*
**/
Ice.FacetNotExistException = class extends Ice.RequestFailedException
{
constructor(id, facet, operation, _cause = "")
{
super(id, facet, operation, _cause);
}
static get _parent()
{
return Ice.RequestFailedException;
}
static get _id()
{
return "::Ice::FacetNotExistException";
}
};
/**
* This exception is raised if an operation for a given object does
* not exist on the server. Typically this is caused by either the
* client or the server using an outdated Slice specification.
*
**/
Ice.OperationNotExistException = class extends Ice.RequestFailedException
{
constructor(id, facet, operation, _cause = "")
{
super(id, facet, operation, _cause);
}
static get _parent()
{
return Ice.RequestFailedException;
}
static get _id()
{
return "::Ice::OperationNotExistException";
}
};
/**
* This exception is raised if a system error occurred in the server
* or client process. There are many possible causes for such a system
* exception. For details on the cause, {@link SyscallException#error}
* should be inspected.
*
**/
Ice.SyscallException = class extends Ice.LocalException
{
constructor(error = 0, _cause = "")
{
super(_cause);
this.error = error;
}
static get _parent()
{
return Ice.LocalException;
}
static get _id()
{
return "::Ice::SyscallException";
}
};
/**
* This exception indicates socket errors.
*
**/
Ice.SocketException = class extends Ice.SyscallException
{
constructor(error, _cause = "")
{
super(error, _cause);
}
static get _parent()
{
return Ice.SyscallException;
}
static get _id()
{
return "::Ice::SocketException";
}
};
/**
* This exception indicates CFNetwork errors.
*
**/
Ice.CFNetworkException = class extends Ice.SocketException
{
constructor(error, domain = "", _cause = "")
{
super(error, _cause);
this.domain = domain;
}
static get _parent()
{
return Ice.SocketException;
}
static get _id()
{
return "::Ice::CFNetworkException";
}
};
/**
* This exception indicates file errors.
*
**/
Ice.FileException = class extends Ice.SyscallException
{
constructor(error, path = "", _cause = "")
{
super(error, _cause);
this.path = path;
}
static get _parent()
{
return Ice.SyscallException;
}
static get _id()
{
return "::Ice::FileException";
}
};
/**
* This exception indicates connection failures.
*
**/
Ice.ConnectFailedException = class extends Ice.SocketException
{
constructor(error, _cause = "")
{
super(error, _cause);
}
static get _parent()
{
return Ice.SocketException;
}
static get _id()
{
return "::Ice::ConnectFailedException";
}
};
/**
* This exception indicates a connection failure for which
* the server host actively refuses a connection.
*
**/
Ice.ConnectionRefusedException = class extends Ice.ConnectFailedException
{
constructor(error, _cause = "")
{
super(error, _cause);
}
static get _parent()
{
return Ice.ConnectFailedException;
}
static get _id()
{
return "::Ice::ConnectionRefusedException";
}
};
/**
* This exception indicates a lost connection.
*
**/
Ice.ConnectionLostException = class extends Ice.SocketException
{
constructor(error, _cause = "")
{
super(error, _cause);
}
static get _parent()
{
return Ice.SocketException;
}
static get _id()
{
return "::Ice::ConnectionLostException";
}
};
/**
* This exception indicates a DNS problem. For details on the cause,
* {@link DNSException#error} should be inspected.
*
**/
Ice.DNSException = class extends Ice.LocalException
{
constructor(error = 0, host = "", _cause = "")
{
super(_cause);
this.error = error;
this.host = host;
}
static get _parent()
{
return Ice.LocalException;
}
static get _id()
{
return "::Ice::DNSException";
}
};
/**
* This exception indicates a request was interrupted.
*
**/
Ice.OperationInterruptedException = class extends Ice.LocalException
{
constructor(_cause = "")
{
super(_cause);
}
static get _parent()
{
return Ice.LocalException;
}
static get _id()
{
return "::Ice::OperationInterruptedException";
}
};
/**
* This exception indicates a timeout condition.
*
**/
Ice.TimeoutException = class extends Ice.LocalException
{
constructor(_cause = "")
{
super(_cause);
}
static get _parent()
{
return Ice.LocalException;
}
static get _id()
{
return "::Ice::TimeoutException";
}
};
/**
* This exception indicates a connection establishment timeout condition.
*
**/
Ice.ConnectTimeoutException = class extends Ice.TimeoutException
{
constructor(_cause = "")
{
super(_cause);
}
static get _parent()
{
return Ice.TimeoutException;
}
static get _id()
{
return "::Ice::ConnectTimeoutException";
}
};
/**
* This exception indicates a connection closure timeout condition.
*
**/
Ice.CloseTimeoutException = class extends Ice.TimeoutException
{
constructor(_cause = "")
{
super(_cause);
}
static get _parent()
{
return Ice.TimeoutException;
}
static get _id()
{
return "::Ice::CloseTimeoutException";
}
};
/**
* This exception indicates that a connection has been shut down because it has been
* idle for some time.
*
**/
Ice.ConnectionTimeoutException = class extends Ice.TimeoutException
{
constructor(_cause = "")
{
super(_cause);
}
static get _parent()
{
return Ice.TimeoutException;
}
static get _id()
{
return "::Ice::ConnectionTimeoutException";
}
};
/**
* This exception indicates that an invocation failed because it timed
* out.
*
**/
Ice.InvocationTimeoutException = class extends Ice.TimeoutException
{
constructor(_cause = "")
{
super(_cause);
}
static get _parent()
{
return Ice.TimeoutException;
}
static get _id()
{
return "::Ice::InvocationTimeoutException";
}
};
/**
* This exception indicates that an asynchronous invocation failed
* because it was canceled explicitly by the user.
*
**/
Ice.InvocationCanceledException = class extends Ice.LocalException
{
constructor(_cause = "")
{
super(_cause);
}
static get _parent()
{
return Ice.LocalException;
}
static get _id()
{
return "::Ice::InvocationCanceledException";
}
};
/**
* A generic exception base for all kinds of protocol error
* conditions.
*
**/
Ice.ProtocolException = class extends Ice.LocalException
{
constructor(reason = "", _cause = "")
{
super(_cause);
this.reason = reason;
}
static get _parent()
{
return Ice.LocalException;
}
static get _id()
{
return "::Ice::ProtocolException";
}
};
/**
* This exception indicates that a message did not start with the expected
* magic number ('I', 'c', 'e', 'P').
*
**/
Ice.BadMagicException = class extends Ice.ProtocolException
{
constructor(reason, badMagic = null, _cause = "")
{
super(reason, _cause);
this.badMagic = badMagic;
}
static get _parent()
{
return Ice.ProtocolException;
}
static get _id()
{
return "::Ice::BadMagicException";
}
};
/**
* This exception indicates an unsupported protocol version.
*
**/
Ice.UnsupportedProtocolException = class extends Ice.ProtocolException
{
constructor(reason, bad = new Ice.ProtocolVersion(), supported = new Ice.ProtocolVersion(), _cause = "")
{
super(reason, _cause);
this.bad = bad;
this.supported = supported;
}
static get _parent()
{
return Ice.ProtocolException;
}
static get _id()
{
return "::Ice::UnsupportedProtocolException";
}
};
/**
* This exception indicates an unsupported data encoding version.
*
**/
Ice.UnsupportedEncodingException = class extends Ice.ProtocolException
{
constructor(reason, bad = new Ice.EncodingVersion(), supported = new Ice.EncodingVersion(), _cause = "")
{
super(reason, _cause);
this.bad = bad;
this.supported = supported;
}
static get _parent()
{
return Ice.ProtocolException;
}
static get _id()
{
return "::Ice::UnsupportedEncodingException";
}
};
/**
* This exception indicates that an unknown protocol message has been received.
*
**/
Ice.UnknownMessageException = class extends Ice.ProtocolException
{
constructor(reason, _cause = "")
{
super(reason, _cause);
}
static get _parent()
{
return Ice.ProtocolException;
}
static get _id()
{
return "::Ice::UnknownMessageException";
}
};
/**
* This exception is raised if a message is received over a connection
* that is not yet validated.
*
**/
Ice.ConnectionNotValidatedException = class extends Ice.ProtocolException
{
constructor(reason, _cause = "")
{
super(reason, _cause);
}
static get _parent()
{
return Ice.ProtocolException;
}
static get _id()
{
return "::Ice::ConnectionNotValidatedException";
}
};
/**
* This exception indicates that a response for an unknown request ID has been
* received.
*
**/
Ice.UnknownRequestIdException = class extends Ice.ProtocolException
{
constructor(reason, _cause = "")
{
super(reason, _cause);
}
static get _parent()
{
return Ice.ProtocolException;
}
static get _id()
{
return "::Ice::UnknownRequestIdException";
}
};
/**
* This exception indicates that an unknown reply status has been received.
*
**/
Ice.UnknownReplyStatusException = class extends Ice.ProtocolException
{
constructor(reason, _cause = "")
{
super(reason, _cause);
}
static get _parent()
{
return Ice.ProtocolException;
}
static get _id()
{
return "::Ice::UnknownReplyStatusException";
}
};
/**
* This exception indicates that the connection has been gracefully shut down by the
* server. The operation call that caused this exception has not been
* executed by the server. In most cases you will not get this
* exception, because the client will automatically retry the
* operation call in case the server shut down the connection. However,
* if upon retry the server shuts down the connection again, and the
* retry limit has been reached, then this exception is propagated to
* the application code.
*
**/
Ice.CloseConnectionException = class extends Ice.ProtocolException
{
constructor(reason, _cause = "")
{
super(reason, _cause);
}
static get _parent()
{
return Ice.ProtocolException;
}
static get _id()
{
return "::Ice::CloseConnectionException";
}
};
/**
* This exception is raised by an operation call if the application
* closes the connection locally using {@link Connection#close}.
*
* @see Connection#close
*
**/
Ice.ConnectionManuallyClosedException = class extends Ice.LocalException
{
constructor(graceful = false, _cause = "")
{
super(_cause);
this.graceful = graceful;
}
static get _parent()
{
return Ice.LocalException;
}
static get _id()
{
return "::Ice::ConnectionManuallyClosedException";
}
};
/**
* This exception indicates that a message size is less
* than the minimum required size.
*
**/
Ice.IllegalMessageSizeException = class extends Ice.ProtocolException
{
constructor(reason, _cause = "")
{
super(reason, _cause);
}
static get _parent()
{
return Ice.ProtocolException;
}
static get _id()
{
return "::Ice::IllegalMessageSizeException";
}
};
/**
* This exception indicates a problem with compressing or uncompressing data.
*
**/
Ice.CompressionException = class extends Ice.ProtocolException
{
constructor(reason, _cause = "")
{
super(reason, _cause);
}
static get _parent()
{
return Ice.ProtocolException;
}
static get _id()
{
return "::Ice::CompressionException";
}
};
/**
* A datagram exceeds the configured size.
*
* This exception is raised if a datagram exceeds the configured send or receive buffer
* size, or exceeds the maximum payload size of a UDP packet (65507 bytes).
*
**/
Ice.DatagramLimitException = class extends Ice.ProtocolException
{
constructor(reason, _cause = "")
{
super(reason, _cause);
}
static get _parent()
{
return Ice.ProtocolException;
}
static get _id()
{
return "::Ice::DatagramLimitException";
}
};
/**
* This exception is raised for errors during marshaling or unmarshaling data.
*
**/
Ice.MarshalException = class extends Ice.ProtocolException
{
constructor(reason, _cause = "")
{
super(reason, _cause);
}
static get _parent()
{
return Ice.ProtocolException;
}
static get _id()
{
return "::Ice::MarshalException";
}
};
/**
* This exception is raised if inconsistent data is received while unmarshaling a proxy.
*
**/
Ice.ProxyUnmarshalException = class extends Ice.MarshalException
{
constructor(reason, _cause = "")
{
super(reason, _cause);
}
static get _parent()
{
return Ice.MarshalException;
}
static get _id()
{
return "::Ice::ProxyUnmarshalException";
}
};
/**
* This exception is raised if an out-of-bounds condition occurs during unmarshaling.
*
**/
Ice.UnmarshalOutOfBoundsException = class extends Ice.MarshalException
{
constructor(reason, _cause = "")
{
super(reason, _cause);
}
static get _parent()
{
return Ice.MarshalException;
}
static get _id()
{
return "::Ice::UnmarshalOutOfBoundsException";
}
};
/**
* This exception is raised if no suitable value factory was found during
* unmarshaling of a Slice class instance.
*
* @see ValueFactory
* @see Communicator#getValueFactoryManager
* @see ValueFactoryManager#add
* @see ValueFactoryManager#find
*
**/
Ice.NoValueFactoryException = class extends Ice.MarshalException
{
constructor(reason, type = "", _cause = "")
{
super(reason, _cause);
this.type = type;
}
static get _parent()
{
return Ice.MarshalException;
}
static get _id()
{
return "::Ice::NoValueFactoryException";
}
};
/**
* This exception is raised if the type of an unmarshaled Slice class instance does
* not match its expected type.
* This can happen if client and server are compiled with mismatched Slice
* definitions or if a class of the wrong type is passed as a parameter
* or return value using dynamic invocation. This exception can also be
* raised if IceStorm is used to send Slice class instances and
* an operation is subscribed to the wrong topic.
*
**/
Ice.UnexpectedObjectException = class extends Ice.MarshalException
{
constructor(reason, type = "", expectedType = "", _cause = "")
{
super(reason, _cause);
this.type = type;
this.expectedType = expectedType;
}
static get _parent()
{
return Ice.MarshalException;
}
static get _id()
{
return "::Ice::UnexpectedObjectException";
}
};
/**
* This exception is raised when Ice receives a request or reply
* message whose size exceeds the limit specified by the
* Ice.MessageSizeMax
property.
*
**/
Ice.MemoryLimitException = class extends Ice.MarshalException
{
constructor(reason, _cause = "")
{
super(reason, _cause);
}
static get _parent()
{
return Ice.MarshalException;
}
static get _id()
{
return "::Ice::MemoryLimitException";
}
};
/**
* This exception is raised when a string conversion to or from UTF-8
* fails during marshaling or unmarshaling.
*
**/
Ice.StringConversionException = class extends Ice.MarshalException
{
constructor(reason, _cause = "")
{
super(reason, _cause);
}
static get _parent()
{
return Ice.MarshalException;
}
static get _id()
{
return "::Ice::StringConversionException";
}
};
/**
* This exception indicates a malformed data encapsulation.
*
**/
Ice.EncapsulationException = class extends Ice.MarshalException
{
constructor(reason, _cause = "")
{
super(reason, _cause);
}
static get _parent()
{
return Ice.MarshalException;
}
static get _id()
{
return "::Ice::EncapsulationException";
}
};
/**
* This exception is raised if an unsupported feature is used. The
* unsupported feature string contains the name of the unsupported
* feature
*
**/
Ice.FeatureNotSupportedException = class extends Ice.LocalException
{
constructor(unsupportedFeature = "", _cause = "")
{
super(_cause);
this.unsupportedFeature = unsupportedFeature;
}
static get _parent()
{
return Ice.LocalException;
}
static get _id()
{
return "::Ice::FeatureNotSupportedException";
}
};
/**
* This exception indicates a failure in a security subsystem,
* such as the IceSSL plug-in.
*
**/
Ice.SecurityException = class extends Ice.LocalException
{
constructor(reason = "", _cause = "")
{
super(_cause);
this.reason = reason;
}
static get _parent()
{
return Ice.LocalException;
}
static get _id()
{
return "::Ice::SecurityException";
}
};
/**
* This exception indicates that an attempt has been made to
* change the connection properties of a fixed proxy.
*
**/
Ice.FixedProxyException = class extends Ice.LocalException
{
constructor(_cause = "")
{
super(_cause);
}
static get _parent()
{
return Ice.LocalException;
}
static get _id()
{
return "::Ice::FixedProxyException";
}
};
/**
* Indicates that the response to a request has already been sent;
* re-dispatching such a request is not possible.
*
**/
Ice.ResponseSentException = class extends Ice.LocalException
{
constructor(_cause = "")
{
super(_cause);
}
static get _parent()
{
return Ice.LocalException;
}
static get _id()
{
return "::Ice::ResponseSentException";
}
};
}());
(function()
{
//
// Copyright (c) ZeroC, Inc. All rights reserved.
//
const CommunicatorDestroyedException = Ice.CommunicatorDestroyedException;
class Timer
{
constructor(logger)
{
this._logger = logger;
this._destroyed = false;
this._tokenId = 0;
this._tokens = new Map();
}
destroy()
{
this._tokens.forEach((value, key) => this.cancel(key));
this._destroyed = true;
this._tokens.clear();
}
schedule(callback, delay)
{
if(this._destroyed)
{
throw new CommunicatorDestroyedException();
}
const token = this._tokenId++;
const id = Timer.setTimeout(() => this.handleTimeout(token), delay);
this._tokens.set(token, {callback: callback, id: id, isInterval: false});
return token;
}
scheduleRepeated(callback, period)
{
if(this._destroyed)
{
throw new CommunicatorDestroyedException();
}
const token = this._tokenId++;
const id = Timer.setInterval(() => this.handleInterval(token), period);
this._tokens.set(token, {callback: callback, id: id, isInterval: true});
return token;
}
cancel(id)
{
if(this._destroyed)
{
return false;
}
const token = this._tokens.get(id);
if(token === undefined)
{
return false;
}
this._tokens.delete(id);
if(token.isInterval)
{
Timer.clearInterval(token.id);
}
else
{
Timer.clearTimeout(token.id);
}
return true;
}
handleTimeout(id)
{
if(this._destroyed)
{
return;
}
const token = this._tokens.get(id);
if(token !== undefined)
{
this._tokens.delete(id);
try
{
token.callback();
}
catch(ex)
{
this._logger.warning("uncaught exception while executing timer:\n" + ex);
}
}
}
handleInterval(id)
{
if(this._destroyed)
{
return;
}
const token = this._tokens.get(id);
if(token !== undefined)
{
try
{
token.callback();
}
catch(ex)
{
this._logger.warning("uncaught exception while executing timer:\n" + ex);
}
}
}
}
Timer.setTimeout = Ice.Timer.setTimeout;
Timer.clearTimeout = Ice.Timer.clearTimeout;
Timer.setInterval = Ice.Timer.setInterval;
Timer.clearInterval = Ice.Timer.clearInterval;
Timer.setImmediate = Ice.Timer.setImmediate;
Ice.Timer = Timer;
}());
(function()
{
//
// Copyright (c) ZeroC, Inc. All rights reserved.
//
//
// Local aliases.
//
const UnexpectedObjectException = Ice.UnexpectedObjectException;
const MemoryLimitException = Ice.MemoryLimitException;
//
// Exception utilities
//
Ice.ExUtil =
{
throwUOE: function(expectedType, v)
{
const type = v.ice_id();
throw new UnexpectedObjectException("expected element of type `" + expectedType + "' but received `" +
type + "'", type, expectedType);
},
throwMemoryLimitException: function(requested, maximum)
{
throw new MemoryLimitException("requested " + requested + " bytes, maximum allowed is " + maximum +
" bytes (see Ice.MessageSizeMax)");
}
};
}());
(function()
{
//
// Copyright (c) ZeroC, Inc. All rights reserved.
//
class Logger
{
constructor(prefix)
{
if(prefix !== undefined && prefix.length > 0)
{
this._prefix = prefix + ": ";
}
else
{
this._prefix = "";
}
this._dateformat =
{
year: 'numeric',
month: 'numeric',
day: 'numeric',
hour: 'numeric',
minute: 'numeric',
second: 'numeric',
hour12: false
};
}
print(message)
{
this.write(message, false);
}
trace(category, message)
{
const s = [];
s.push("-- ");
s.push(this.timestamp());
s.push(' ');
s.push(this._prefix);
s.push(category);
s.push(": ");
s.push(message);
this.write(s.join(""), true);
}
warning(message)
{
const s = [];
s.push("-! ");
s.push(this.timestamp());
s.push(' ');
s.push(this._prefix);
s.push("warning: ");
s.push(message);
this.write(s.join(""), true);
}
error(message)
{
const s = [];
s.push("!! ");
s.push(this.timestamp());
s.push(' ');
s.push(this._prefix);
s.push("error: ");
s.push(message);
this.write(s.join(""), true);
}
cloneWithPrefix(prefix)
{
return new Logger(prefix);
}
write(message, indent)
{
if(indent)
{
message = message.replace(/\n/g, "\n ");
}
console.log(message);
}
timestamp()
{
const d = new Date();
return d.toLocaleString("en-US", this._dateformat) + "." + d.getMilliseconds();
}
}
Ice.Logger = Logger;
}());
(function()
{
//
// Copyright (c) ZeroC, Inc. All rights reserved.
//
class SliceInfo
{
constructor()
{
//
// The Slice type ID for this slice.
//
this.typeId = "";
//
// The Slice compact type ID for this slice.
//
this.compactId = -1;
//
// The encoded bytes for this slice, including the leading size integer.
//
this.bytes = [];
//
// The class instances referenced by this slice.
//
this.instances = [];
//
// Whether or not the slice contains optional members.
//
this.hasOptionalMembers = false;
//
// Whether or not this is the last slice.
//
this.isLastSlice = false;
}
}
Ice.SliceInfo = SliceInfo;
class SlicedData
{
constructor(slices)
{
this.slices = slices;
}
}
Ice.SlicedData = SlicedData;
class UnknownSlicedValue extends Ice.Value
{
constructor(unknownTypeId)
{
super();
this._unknownTypeId = unknownTypeId;
}
ice_getSlicedData()
{
return this._slicedData;
}
ice_id()
{
return this._unknownTypeId;
}
_iceWrite(os)
{
os.startValue(this._slicedData);
os.endValue();
}
_iceRead(is)
{
is.startValue();
this._slicedData = is.endValue(true);
}
}
Ice.UnknownSlicedValue = UnknownSlicedValue;
}());
(function()
{
//
// Copyright (c) ZeroC, Inc. All rights reserved.
//
const StringUtil = Ice.StringUtil;
const Protocol = {};
Ice.Encoding_1_0 = new Ice.EncodingVersion(1, 0);
Ice.Encoding_1_1 = new Ice.EncodingVersion(1, 1);
Ice.Protocol_1_0 = new Ice.ProtocolVersion(1, 0);
//
// Size of the Ice protocol header
//
// Magic number (4 bytes)
// Protocol version major (Byte)
// Protocol version minor (Byte)
// Encoding version major (Byte)
// Encoding version minor (Byte)
// Message type (Byte)
// Compression status (Byte)
// Message size (Int)
//
Protocol.headerSize = 14;
//
// The magic number at the front of each message ['I', 'c', 'e', 'P']
//
Protocol.magic = new Uint8Array([0x49, 0x63, 0x65, 0x50]);
//
// The current Ice protocol and encoding version
//
Protocol.protocolMajor = 1;
Protocol.protocolMinor = 0;
Protocol.protocolEncodingMajor = 1;
Protocol.protocolEncodingMinor = 0;
Protocol.encodingMajor = 1;
Protocol.encodingMinor = 1;
//
// The Ice protocol message types
//
Protocol.requestMsg = 0;
Protocol.requestBatchMsg = 1;
Protocol.replyMsg = 2;
Protocol.validateConnectionMsg = 3;
Protocol.closeConnectionMsg = 4;
//
// Reply status
//
Protocol.replyOK = 0;
Protocol.replyUserException = 1;
Protocol.replyObjectNotExist = 2;
Protocol.replyFacetNotExist = 3;
Protocol.replyOperationNotExist = 4;
Protocol.replyUnknownLocalException = 5;
Protocol.replyUnknownUserException = 6;
Protocol.replyUnknownException = 7;
Protocol.requestHdr = new Uint8Array([
Protocol.magic[0],
Protocol.magic[1],
Protocol.magic[2],
Protocol.magic[3],
Protocol.protocolMajor,
Protocol.protocolMinor,
Protocol.protocolEncodingMajor,
Protocol.protocolEncodingMinor,
Protocol.requestMsg,
0, // Compression status.
0, 0, 0, 0, // Message size (placeholder).
0, 0, 0, 0 // Request ID (placeholder).
]);
Protocol.requestBatchHdr = new Uint8Array([
Protocol.magic[0],
Protocol.magic[1],
Protocol.magic[2],
Protocol.magic[3],
Protocol.protocolMajor,
Protocol.protocolMinor,
Protocol.protocolEncodingMajor,
Protocol.protocolEncodingMinor,
Protocol.requestBatchMsg,
0, // Compression status.
0, 0, 0, 0, // Message size (placeholder).
0, 0, 0, 0 // Number of requests in batch (placeholder).
]);
Protocol.replyHdr = new Uint8Array([
Protocol.magic[0],
Protocol.magic[1],
Protocol.magic[2],
Protocol.magic[3],
Protocol.protocolMajor,
Protocol.protocolMinor,
Protocol.protocolEncodingMajor,
Protocol.protocolEncodingMinor,
Protocol.replyMsg,
0, // Compression status.
0, 0, 0, 0 // Message size (placeholder).
]);
Protocol.currentProtocol = new Ice.ProtocolVersion(Protocol.protocolMajor, Protocol.protocolMinor);
Protocol.currentProtocolEncoding = new Ice.EncodingVersion(Protocol.protocolEncodingMajor,
Protocol.protocolEncodingMinor);
Protocol.currentEncoding = new Ice.EncodingVersion(Protocol.encodingMajor, Protocol.encodingMinor);
Protocol.checkSupportedProtocol = function(v)
{
if(v.major !== Protocol.currentProtocol.major || v.minor > Protocol.currentProtocol.minor)
{
throw new Ice.UnsupportedProtocolException("", v, Protocol.currentProtocol);
}
};
Protocol.checkSupportedProtocolEncoding = function(v)
{
if(v.major !== Protocol.currentProtocolEncoding.major ||
v.minor > Protocol.currentProtocolEncoding.minor)
{
throw new Ice.UnsupportedEncodingException("", v, Protocol.currentProtocolEncoding);
}
};
Protocol.checkSupportedEncoding = function(v)
{
if(v.major !== Protocol.currentEncoding.major || v.minor > Protocol.currentEncoding.minor)
{
throw new Ice.UnsupportedEncodingException("", v, Protocol.currentEncoding);
}
};
//
// Either return the given protocol if not compatible, or the greatest
// supported protocol otherwise.
//
Protocol.getCompatibleProtocol = function(v)
{
if(v.major !== Protocol.currentProtocol.major)
{
return v; // Unsupported protocol, return as is.
}
else if(v.minor < Protocol.currentProtocol.minor)
{
return v; // Supported protocol.
}
else
{
//
// Unsupported but compatible, use the currently supported
// protocol, that's the best we can do.
//
return Protocol.currentProtocol;
}
};
//
// Either return the given encoding if not compatible, or the greatest
// supported encoding otherwise.
//
Protocol.getCompatibleEncoding = function(v)
{
if(v.major !== Protocol.currentEncoding.major)
{
return v; // Unsupported encoding, return as is.
}
else if(v.minor < Protocol.currentEncoding.minor)
{
return v; // Supported encoding.
}
else
{
//
// Unsupported but compatible, use the currently supported
// encoding, that's the best we can do.
//
return Protocol.currentEncoding;
}
};
Protocol.isSupported = function(version, supported)
{
return version.major === supported.major && version.minor <= supported.minor;
};
/**
* Converts a string to a protocol version.
*
* @param version The string to convert.
*
* @return The converted protocol version.
**/
Ice.stringToProtocolVersion = function(version)
{
return new Ice.ProtocolVersion(stringToMajor(version), stringToMinor(version));
};
/**
* Converts a string to an encoding version.
*
* @param version The string to convert.
*
* @return The converted object identity.
**/
Ice.stringToEncodingVersion = function(version)
{
return new Ice.EncodingVersion(stringToMajor(version), stringToMinor(version));
};
/**
* Converts a protocol version to a string.
*
* @param v The protocol version to convert.
*
* @return The converted string.
**/
Ice.protocolVersionToString = function(v)
{
return majorMinorToString(v.major, v.minor);
};
/**
* Converts an encoding version to a string.
*
* @param v The encoding version to convert.
*
* @return The converted string.
**/
Ice.encodingVersionToString = function(v)
{
return majorMinorToString(v.major, v.minor);
};
Protocol.OPTIONAL_END_MARKER = 0xFF;
Protocol.FLAG_HAS_TYPE_ID_STRING = (1 << 0);
Protocol.FLAG_HAS_TYPE_ID_INDEX = (1 << 1);
Protocol.FLAG_HAS_TYPE_ID_COMPACT = (1 << 1 | 1 << 0);
Protocol.FLAG_HAS_OPTIONAL_MEMBERS = (1 << 2);
Protocol.FLAG_HAS_INDIRECTION_TABLE = (1 << 3);
Protocol.FLAG_HAS_SLICE_SIZE = (1 << 4);
Protocol.FLAG_IS_LAST_SLICE = (1 << 5);
Ice.Protocol = Protocol;
function stringToMajor(str)
{
const pos = str.indexOf('.');
if(pos === -1)
{
throw new Ice.VersionParseException("malformed version value `" + str + "'");
}
try
{
const majVersion = StringUtil.toInt(str.substring(0, pos));
if(majVersion < 1 || majVersion > 255)
{
throw new Ice.VersionParseException("range error in version `" + str + "'");
}
return majVersion;
}
catch(ex)
{
throw new Ice.VersionParseException("invalid version value `" + str + "'");
}
}
function stringToMinor(str)
{
const pos = str.indexOf('.');
if(pos === -1)
{
throw new Ice.VersionParseException("malformed version value `" + str + "'");
}
try
{
const minVersion = StringUtil.toInt(str.substring(pos + 1));
if(minVersion < 0 || minVersion > 255)
{
throw new Ice.VersionParseException("range error in version `" + str + "'");
}
return minVersion;
}
catch(ex)
{
throw new Ice.VersionParseException("invalid version value `" + str + "'");
}
}
function majorMinorToString(major, minor)
{
return major + "." + minor;
}
}());
(function()
{
//
// Copyright (c) ZeroC, Inc. All rights reserved.
//
class MapUtil
{
static equals(m1, m2)
{
if(m1 === m2)
{
return true;
}
else if(m1.size != m2.size)
{
return false;
}
else
{
for(const [key, value] of m1)
{
if(value === undefined)
{
if(!m2.has(key))
{
return false;
}
else if(m2.get(key) !== value)
{
return false;
}
}
else if(m2.get(key) !== value)
{
return false;
}
}
}
return true;
}
}
Ice.MapUtil = MapUtil;
}());
(function()
{
//
// Copyright (c) ZeroC, Inc. All rights reserved.
//
//
// Ice version 3.7.5
//
// Current
as its implicit final
* parameter. Current
is mostly used for Ice services. Most
* applications ignore this parameter.
*
**/
Ice.Current = class
{
constructor(adapter = null, con = null, id = new Ice.Identity(), facet = "", operation = "", mode = Ice.OperationMode.Normal, ctx = null, requestId = 0, encoding = new Ice.EncodingVersion())
{
this.adapter = adapter;
this.con = con;
this.id = id;
this.facet = facet;
this.operation = operation;
this.mode = mode;
this.ctx = ctx;
this.requestId = requestId;
this.encoding = encoding;
}
};
Slice.defineStruct(Ice.Current, false, true);
}());
(function()
{
//
// Copyright (c) ZeroC, Inc. All rights reserved.
//
Ice.Property = class
{
constructor(pattern, deprecated, deprecatedBy)
{
this._pattern = pattern;
this._deprecated = deprecated;
this._deprecatedBy = deprecatedBy;
}
get pattern()
{
return this._pattern;
}
get deprecated()
{
return this._deprecated;
}
get deprecatedBy()
{
return this._deprecatedBy;
}
};
}());
(function()
{
//
// Copyright (c) ZeroC, Inc. All rights reserved.
//
// Generated by makeprops.py from file ./config/PropertyNames.xml, Thu Jul 2 14:55:02 2020
// IMPORTANT: Do not edit this file -- any edits made here will be lost!
/* eslint comma-dangle: "off" */
/* eslint array-bracket-newline: "off" */
/* eslint no-useless-escape: "off" */
const PropertyNames = {};
const Property = Ice.Property;
PropertyNames.IceProps =
[
new Property("/^Ice\.AcceptClassCycles/", false, null),
new Property("/^Ice\.ACM\.Client/", true, null),
new Property("/^Ice\.ACM\.Server/", true, null),
new Property("/^Ice\.ACM\.Timeout/", false, null),
new Property("/^Ice\.ACM\.Heartbeat/", false, null),
new Property("/^Ice\.ACM\.Close/", false, null),
new Property("/^Ice\.ACM/", false, null),
new Property("/^Ice\.ACM\.Client\.Timeout/", false, null),
new Property("/^Ice\.ACM\.Client\.Heartbeat/", false, null),
new Property("/^Ice\.ACM\.Client\.Close/", false, null),
new Property("/^Ice\.ACM\.Client/", false, null),
new Property("/^Ice\.ACM\.Server\.Timeout/", false, null),
new Property("/^Ice\.ACM\.Server\.Heartbeat/", false, null),
new Property("/^Ice\.ACM\.Server\.Close/", false, null),
new Property("/^Ice\.ACM\.Server/", false, null),
new Property("/^Ice\.Admin\.ACM\.Timeout/", false, null),
new Property("/^Ice\.Admin\.ACM\.Heartbeat/", false, null),
new Property("/^Ice\.Admin\.ACM\.Close/", false, null),
new Property("/^Ice\.Admin\.ACM/", false, null),
new Property("/^Ice\.Admin\.AdapterId/", false, null),
new Property("/^Ice\.Admin\.Endpoints/", false, null),
new Property("/^Ice\.Admin\.Locator\.EndpointSelection/", false, null),
new Property("/^Ice\.Admin\.Locator\.ConnectionCached/", false, null),
new Property("/^Ice\.Admin\.Locator\.PreferSecure/", false, null),
new Property("/^Ice\.Admin\.Locator\.LocatorCacheTimeout/", false, null),
new Property("/^Ice\.Admin\.Locator\.InvocationTimeout/", false, null),
new Property("/^Ice\.Admin\.Locator\.Locator/", false, null),
new Property("/^Ice\.Admin\.Locator\.Router/", false, null),
new Property("/^Ice\.Admin\.Locator\.CollocationOptimized/", false, null),
new Property("/^Ice\.Admin\.Locator\.Context\../", false, null),
new Property("/^Ice\.Admin\.Locator/", false, null),
new Property("/^Ice\.Admin\.PublishedEndpoints/", false, null),
new Property("/^Ice\.Admin\.ReplicaGroupId/", false, null),
new Property("/^Ice\.Admin\.Router\.EndpointSelection/", false, null),
new Property("/^Ice\.Admin\.Router\.ConnectionCached/", false, null),
new Property("/^Ice\.Admin\.Router\.PreferSecure/", false, null),
new Property("/^Ice\.Admin\.Router\.LocatorCacheTimeout/", false, null),
new Property("/^Ice\.Admin\.Router\.InvocationTimeout/", false, null),
new Property("/^Ice\.Admin\.Router\.Locator/", false, null),
new Property("/^Ice\.Admin\.Router\.Router/", false, null),
new Property("/^Ice\.Admin\.Router\.CollocationOptimized/", false, null),
new Property("/^Ice\.Admin\.Router\.Context\../", false, null),
new Property("/^Ice\.Admin\.Router/", false, null),
new Property("/^Ice\.Admin\.ProxyOptions/", false, null),
new Property("/^Ice\.Admin\.ThreadPool\.Size/", false, null),
new Property("/^Ice\.Admin\.ThreadPool\.SizeMax/", false, null),
new Property("/^Ice\.Admin\.ThreadPool\.SizeWarn/", false, null),
new Property("/^Ice\.Admin\.ThreadPool\.StackSize/", false, null),
new Property("/^Ice\.Admin\.ThreadPool\.Serialize/", false, null),
new Property("/^Ice\.Admin\.ThreadPool\.ThreadIdleTime/", false, null),
new Property("/^Ice\.Admin\.ThreadPool\.ThreadPriority/", false, null),
new Property("/^Ice\.Admin\.MessageSizeMax/", false, null),
new Property("/^Ice\.Admin\.DelayCreation/", false, null),
new Property("/^Ice\.Admin\.Enabled/", false, null),
new Property("/^Ice\.Admin\.Facets/", false, null),
new Property("/^Ice\.Admin\.InstanceName/", false, null),
new Property("/^Ice\.Admin\.Logger\.KeepLogs/", false, null),
new Property("/^Ice\.Admin\.Logger\.KeepTraces/", false, null),
new Property("/^Ice\.Admin\.Logger\.Properties/", false, null),
new Property("/^Ice\.Admin\.ServerId/", false, null),
new Property("/^Ice\.BackgroundLocatorCacheUpdates/", false, null),
new Property("/^Ice\.BatchAutoFlush/", true, null),
new Property("/^Ice\.BatchAutoFlushSize/", false, null),
new Property("/^Ice\.ChangeUser/", false, null),
new Property("/^Ice\.ClassGraphDepthMax/", false, null),
new Property("/^Ice\.ClientAccessPolicyProtocol/", false, null),
new Property("/^Ice\.Compression\.Level/", false, null),
new Property("/^Ice\.CollectObjects/", false, null),
new Property("/^Ice\.Config/", false, null),
new Property("/^Ice\.ConsoleListener/", false, null),
new Property("/^Ice\.Default\.CollocationOptimized/", false, null),
new Property("/^Ice\.Default\.EncodingVersion/", false, null),
new Property("/^Ice\.Default\.EndpointSelection/", false, null),
new Property("/^Ice\.Default\.Host/", false, null),
new Property("/^Ice\.Default\.Locator\.EndpointSelection/", false, null),
new Property("/^Ice\.Default\.Locator\.ConnectionCached/", false, null),
new Property("/^Ice\.Default\.Locator\.PreferSecure/", false, null),
new Property("/^Ice\.Default\.Locator\.LocatorCacheTimeout/", false, null),
new Property("/^Ice\.Default\.Locator\.InvocationTimeout/", false, null),
new Property("/^Ice\.Default\.Locator\.Locator/", false, null),
new Property("/^Ice\.Default\.Locator\.Router/", false, null),
new Property("/^Ice\.Default\.Locator\.CollocationOptimized/", false, null),
new Property("/^Ice\.Default\.Locator\.Context\../", false, null),
new Property("/^Ice\.Default\.Locator/", false, null),
new Property("/^Ice\.Default\.LocatorCacheTimeout/", false, null),
new Property("/^Ice\.Default\.InvocationTimeout/", false, null),
new Property("/^Ice\.Default\.Package/", false, null),
new Property("/^Ice\.Default\.PreferSecure/", false, null),
new Property("/^Ice\.Default\.Protocol/", false, null),
new Property("/^Ice\.Default\.Router\.EndpointSelection/", false, null),
new Property("/^Ice\.Default\.Router\.ConnectionCached/", false, null),
new Property("/^Ice\.Default\.Router\.PreferSecure/", false, null),
new Property("/^Ice\.Default\.Router\.LocatorCacheTimeout/", false, null),
new Property("/^Ice\.Default\.Router\.InvocationTimeout/", false, null),
new Property("/^Ice\.Default\.Router\.Locator/", false, null),
new Property("/^Ice\.Default\.Router\.Router/", false, null),
new Property("/^Ice\.Default\.Router\.CollocationOptimized/", false, null),
new Property("/^Ice\.Default\.Router\.Context\../", false, null),
new Property("/^Ice\.Default\.Router/", false, null),
new Property("/^Ice\.Default\.SlicedFormat/", false, null),
new Property("/^Ice\.Default\.SourceAddress/", false, null),
new Property("/^Ice\.Default\.Timeout/", false, null),
new Property("/^Ice\.EventLog\.Source/", false, null),
new Property("/^Ice\.FactoryAssemblies/", false, null),
new Property("/^Ice\.HTTPProxyHost/", false, null),
new Property("/^Ice\.HTTPProxyPort/", false, null),
new Property("/^Ice\.ImplicitContext/", false, null),
new Property("/^Ice\.InitPlugins/", false, null),
new Property("/^Ice\.IPv4/", false, null),
new Property("/^Ice\.IPv6/", false, null),
new Property("/^Ice\.LogFile/", false, null),
new Property("/^Ice\.LogFile\.SizeMax/", false, null),
new Property("/^Ice\.LogStdErr\.Convert/", false, null),
new Property("/^Ice\.MessageSizeMax/", false, null),
new Property("/^Ice\.Nohup/", false, null),
new Property("/^Ice\.NullHandleAbort/", false, null),
new Property("/^Ice\.Override\.CloseTimeout/", false, null),
new Property("/^Ice\.Override\.Compress/", false, null),
new Property("/^Ice\.Override\.ConnectTimeout/", false, null),
new Property("/^Ice\.Override\.Timeout/", false, null),
new Property("/^Ice\.Override\.Secure/", false, null),
new Property("/^Ice\.Package\../", false, null),
new Property("/^Ice\.Plugin\../", false, null),
new Property("/^Ice\.PluginLoadOrder/", false, null),
new Property("/^Ice\.PreferIPv6Address/", false, null),
new Property("/^Ice\.PreloadAssemblies/", false, null),
new Property("/^Ice\.PrintAdapterReady/", false, null),
new Property("/^Ice\.PrintProcessId/", false, null),
new Property("/^Ice\.PrintStackTraces/", false, null),
new Property("/^Ice\.ProgramName/", false, null),
new Property("/^Ice\.RetryIntervals/", false, null),
new Property("/^Ice\.ServerIdleTime/", false, null),
new Property("/^Ice\.SOCKSProxyHost/", false, null),
new Property("/^Ice\.SOCKSProxyPort/", false, null),
new Property("/^Ice\.StdErr/", false, null),
new Property("/^Ice\.StdOut/", false, null),
new Property("/^Ice\.SyslogFacility/", false, null),
new Property("/^Ice\.ThreadPool\.Client\.Size/", false, null),
new Property("/^Ice\.ThreadPool\.Client\.SizeMax/", false, null),
new Property("/^Ice\.ThreadPool\.Client\.SizeWarn/", false, null),
new Property("/^Ice\.ThreadPool\.Client\.StackSize/", false, null),
new Property("/^Ice\.ThreadPool\.Client\.Serialize/", false, null),
new Property("/^Ice\.ThreadPool\.Client\.ThreadIdleTime/", false, null),
new Property("/^Ice\.ThreadPool\.Client\.ThreadPriority/", false, null),
new Property("/^Ice\.ThreadPool\.Server\.Size/", false, null),
new Property("/^Ice\.ThreadPool\.Server\.SizeMax/", false, null),
new Property("/^Ice\.ThreadPool\.Server\.SizeWarn/", false, null),
new Property("/^Ice\.ThreadPool\.Server\.StackSize/", false, null),
new Property("/^Ice\.ThreadPool\.Server\.Serialize/", false, null),
new Property("/^Ice\.ThreadPool\.Server\.ThreadIdleTime/", false, null),
new Property("/^Ice\.ThreadPool\.Server\.ThreadPriority/", false, null),
new Property("/^Ice\.ThreadPriority/", false, null),
new Property("/^Ice\.ToStringMode/", false, null),
new Property("/^Ice\.Trace\.Admin\.Properties/", false, null),
new Property("/^Ice\.Trace\.Admin\.Logger/", false, null),
new Property("/^Ice\.Trace\.Locator/", false, null),
new Property("/^Ice\.Trace\.Network/", false, null),
new Property("/^Ice\.Trace\.Protocol/", false, null),
new Property("/^Ice\.Trace\.Retry/", false, null),
new Property("/^Ice\.Trace\.Slicing/", false, null),
new Property("/^Ice\.Trace\.ThreadPool/", false, null),
new Property("/^Ice\.UDP\.RcvSize/", false, null),
new Property("/^Ice\.UDP\.SndSize/", false, null),
new Property("/^Ice\.TCP\.Backlog/", false, null),
new Property("/^Ice\.TCP\.RcvSize/", false, null),
new Property("/^Ice\.TCP\.SndSize/", false, null),
new Property("/^Ice\.UseApplicationClassLoader/", false, null),
new Property("/^Ice\.UseOSLog/", false, null),
new Property("/^Ice\.UseSyslog/", false, null),
new Property("/^Ice\.UseSystemdJournal/", false, null),
new Property("/^Ice\.Warn\.AMICallback/", false, null),
new Property("/^Ice\.Warn\.Connections/", false, null),
new Property("/^Ice\.Warn\.Datagrams/", false, null),
new Property("/^Ice\.Warn\.Dispatch/", false, null),
new Property("/^Ice\.Warn\.Endpoints/", false, null),
new Property("/^Ice\.Warn\.UnknownProperties/", false, null),
new Property("/^Ice\.Warn\.UnusedProperties/", false, null),
new Property("/^Ice\.CacheMessageBuffers/", false, null),
new Property("/^Ice\.ThreadInterruptSafe/", false, null),
new Property("/^Ice\.Voip/", true, null),
];
PropertyNames.validProps =
[
PropertyNames.IceProps,
];
PropertyNames.clPropNames =
[
"Ice",
];
Ice.PropertyNames = PropertyNames;
}());
(function()
{
//
// Copyright (c) ZeroC, Inc. All rights reserved.
//
const Timer = Ice.Timer;
class P extends Promise
{
constructor(cb)
{
let res;
let rej;
super((resolve, reject) =>
{
res = resolve;
rej = reject;
if(cb)
{
cb(resolve, reject);
}
});
this.resolve = res;
this.reject = rej;
}
delay(ms)
{
return this.then(
value => new P((resolve, reject) => Timer.setTimeout(() => resolve(value), ms)),
reason => new P((resolve, reject) => Timer.setTimeout(() => reject(reason), ms)));
}
static get [Symbol.species]()
{
return P;
}
static delay(ms, value)
{
return new P(resolve => Timer.setTimeout(() => resolve(value), ms));
}
static try(cb)
{
return P.resolve().then(cb);
}
}
Ice.Promise = P;
}());
(function()
{
//
// Copyright (c) ZeroC, Inc. All rights reserved.
//
class AsyncResultBase extends Ice.Promise
{
constructor(communicator, op, connection, proxy, adapter)
{
super();
this._communicator = communicator;
this._instance = communicator ? communicator.instance : null;
this._operation = op;
this._connection = connection;
this._proxy = proxy;
this._adapter = adapter;
}
get communicator()
{
return this._communicator;
}
get connection()
{
return this._connection;
}
get proxy()
{
return this._proxy;
}
get adapter()
{
return this._adapter;
}
get operation()
{
return this._operation;
}
}
Ice.AsyncResultBase = AsyncResultBase;
}());
(function()
{
//
// Copyright (c) ZeroC, Inc. All rights reserved.
//
//
// Local aliases.
//
const Debug = Ice.Debug;
const Protocol = Ice.Protocol;
const StringUtil = Ice.StringUtil;
const OperationMode = Ice.OperationMode;
const Identity = Ice.Identity;
const slicingIds = new Map();
function printIdentityFacetOperation(s, stream)
{
let toStringMode = Ice.ToStringMode.Unicode;
if(stream.instance !== null)
{
toStringMode = stream.instance.toStringMode();
}
const identity = new Identity();
identity._read(stream);
s.push("\nidentity = " + Ice.identityToString(identity, toStringMode));
const facet = Ice.StringSeqHelper.read(stream);
s.push("\nfacet = ");
if(facet.length > 0)
{
s.push(StringUtil.escapeString(facet[0], "", toStringMode));
}
const operation = stream.readString();
s.push("\noperation = " + operation);
}
function printRequest(s, stream)
{
const requestId = stream.readInt();
s.push("\nrequest id = " + requestId);
if(requestId === 0)
{
s.push(" (oneway)");
}
printRequestHeader(s, stream);
}
function printBatchRequest(s, stream)
{
const batchRequestNum = stream.readInt();
s.push("\nnumber of requests = " + batchRequestNum);
for(let i = 0; i < batchRequestNum; ++i)
{
s.push("\nrequest #" + i + ':');
printRequestHeader(s, stream);
}
}
function printReply(s, stream)
{
const requestId = stream.readInt();
s.push("\nrequest id = " + requestId);
const replyStatus = stream.readByte();
s.push("\nreply status = " + replyStatus + ' ');
switch(replyStatus)
{
case Protocol.replyOK:
{
s.push("(ok)");
break;
}
case Protocol.replyUserException:
{
s.push("(user exception)");
break;
}
case Protocol.replyObjectNotExist:
case Protocol.replyFacetNotExist:
case Protocol.replyOperationNotExist:
{
switch(replyStatus)
{
case Protocol.replyObjectNotExist:
{
s.push("(object not exist)");
break;
}
case Protocol.replyFacetNotExist:
{
s.push("(facet not exist)");
break;
}
case Protocol.replyOperationNotExist:
{
s.push("(operation not exist)");
break;
}
default:
{
Debug.assert(false);
break;
}
}
printIdentityFacetOperation(s, stream);
break;
}
case Protocol.replyUnknownException:
case Protocol.replyUnknownLocalException:
case Protocol.replyUnknownUserException:
{
switch(replyStatus)
{
case Protocol.replyUnknownException:
{
s.push("(unknown exception)");
break;
}
case Protocol.replyUnknownLocalException:
{
s.push("(unknown local exception)");
break;
}
case Protocol.replyUnknownUserException:
{
s.push("(unknown user exception)");
break;
}
default:
{
Debug.assert(false);
break;
}
}
const unknown = stream.readString();
s.push("\nunknown = " + unknown);
break;
}
default:
{
s.push("(unknown)");
break;
}
}
if(replyStatus === Protocol.replyOK || replyStatus === Protocol.replyUserException)
{
const ver = stream.skipEncapsulation();
if(!ver.equals(Ice.Encoding_1_0))
{
s.push("\nencoding = ");
s.push(Ice.encodingVersionToString(ver));
}
}
}
function printRequestHeader(s, stream)
{
printIdentityFacetOperation(s, stream);
const mode = stream.readByte();
s.push("\nmode = " + mode + ' ');
switch(OperationMode.valueOf(mode))
{
case OperationMode.Normal:
{
s.push("(normal)");
break;
}
case OperationMode.Nonmutating:
{
s.push("(nonmutating)");
break;
}
case OperationMode.Idempotent:
{
s.push("(idempotent)");
break;
}
default:
{
s.push("(unknown)");
break;
}
}
let sz = stream.readSize();
s.push("\ncontext = ");
while(sz-- > 0)
{
const key = stream.readString();
const value = stream.readString();
s.push(key + '/' + value);
if(sz > 0)
{
s.push(", ");
}
}
const ver = stream.skipEncapsulation();
if(!ver.equals(Ice.Encoding_1_0))
{
s.push("\nencoding = ");
s.push(Ice.encodingVersionToString(ver));
}
}
function printHeader(s, stream)
{
stream.readByte(); // Don't bother printing the magic number
stream.readByte();
stream.readByte();
stream.readByte();
// const pMajor = stream.readByte();
// const pMinor = stream.readByte();
// s.push("\nprotocol version = " + pMajor + "." + pMinor);
stream.readByte(); // major
stream.readByte(); // minor
// const eMajor = stream.readByte();
// const eMinor = stream.readByte();
// s.push("\nencoding version = " + eMajor + "." + eMinor);
stream.readByte(); // major
stream.readByte(); // minor
const type = stream.readByte();
s.push("\nmessage type = " + type + " (" + getMessageTypeAsString(type) + ')');
const compress = stream.readByte();
s.push("\ncompression status = " + compress + ' ');
switch(compress)
{
case 0:
{
s.push("(not compressed; do not compress response, if any)");
break;
}
case 1:
{
s.push("(not compressed; compress response, if any)");
break;
}
case 2:
{
s.push("(compressed; compress response, if any)");
break;
}
default:
{
s.push("(unknown)");
break;
}
}
const size = stream.readInt();
s.push("\nmessage size = " + size);
return type;
}
function printMessage(s, stream)
{
const type = printHeader(s, stream);
switch(type)
{
case Protocol.closeConnectionMsg:
case Protocol.validateConnectionMsg:
{
// We're done.
break;
}
case Protocol.requestMsg:
{
printRequest(s, stream);
break;
}
case Protocol.requestBatchMsg:
{
printBatchRequest(s, stream);
break;
}
case Protocol.replyMsg:
{
printReply(s, stream);
break;
}
default:
{
break;
}
}
return type;
}
function getMessageTypeAsString(type)
{
switch(type)
{
case Protocol.requestMsg:
return "request";
case Protocol.requestBatchMsg:
return "batch request";
case Protocol.replyMsg:
return "reply";
case Protocol.closeConnectionMsg:
return "close connection";
case Protocol.validateConnectionMsg:
return "validate connection";
default:
return "unknown";
}
}
class TraceUtil
{
static traceSlicing(kind, typeId, slicingCat, logger)
{
if(!slicingIds.has(typeId))
{
logger.trace(slicingCat, `unknown ${kind} type \`${typeId}'`);
slicingIds.set(typeId, 1);
}
}
static traceSend(stream, logger, traceLevels)
{
if(traceLevels.protocol >= 1)
{
const p = stream.pos;
const is = new Ice.InputStream(stream.instance, stream.getEncoding(), stream.buffer);
is.pos = 0;
const s = [];
const type = printMessage(s, is);
logger.trace(traceLevels.protocolCat, "sending " + getMessageTypeAsString(type) + " " + s.join(""));
stream.pos = p;
}
}
static traceRecv(stream, logger, traceLevels)
{
if(traceLevels.protocol >= 1)
{
const p = stream.pos;
stream.pos = 0;
const s = [];
const type = printMessage(s, stream);
logger.trace(traceLevels.protocolCat, "received " + getMessageTypeAsString(type) + " " + s.join(""));
stream.pos = p;
}
}
static traceOut(heading, stream, logger, traceLevels)
{
if(traceLevels.protocol >= 1)
{
const p = stream.pos;
const is = new Ice.InputStream(stream.instance, stream.getEncoding(), stream.buffer);
is.pos = 0;
const s = [];
s.push(heading);
printMessage(s, is);
logger.trace(traceLevels.protocolCat, s.join(""));
stream.pos = p;
}
}
static traceIn(heading, stream, logger, traceLevels)
{
if(traceLevels.protocol >= 1)
{
const p = stream.pos;
stream.pos = 0;
const s = [];
s.push(heading);
printMessage(s, stream);
logger.trace(traceLevels.protocolCat, s.join(""));
stream.pos = p;
}
}
static dumpStream(stream)
{
const pos = stream.pos;
stream.pos = 0;
const data = stream.readBlob(stream.size());
TraceUtil.dumpOctets(data);
stream.pos = pos;
}
static dumpOctets(data)
{
const inc = 8;
const buf = [];
for(let i = 0; i < data.length; i += inc)
{
for(let j = i; j - i < inc; j++)
{
if(j < data.length)
{
let n = data[j];
if(n < 0)
{
n += 256;
}
let s;
if(n < 10)
{
s = " " + n;
}
else if(n < 100)
{
s = " " + n;
}
else
{
s = String(n);
}
buf.push(s + " ");
}
else
{
buf.push(" ");
}
}
buf.push('"');
for(let j = i; j < data.length && j - i < inc; j++)
{
if(data[j] >= 32 && data[j] < 127)
{
buf.push(String.fromCharCode(data[j]));
}
else
{
buf.push('.');
}
}
buf.push("\"\n");
}
console.log(buf.join(""));
}
}
Ice.TraceUtil = TraceUtil;
}());
(function()
{
//
// Copyright (c) ZeroC, Inc. All rights reserved.
//
class RetryException extends Error
{
constructor(ex)
{
super();
if(ex instanceof Ice.LocalException)
{
this._ex = ex;
}
else
{
Ice.Debug.assert(ex instanceof RetryException);
this._ex = ex._ex;
}
}
get inner()
{
return this._ex;
}
}
Ice.RetryException = RetryException;
}());
(function()
{
//
// Copyright (c) ZeroC, Inc. All rights reserved.
//
const _ModuleRegistry = Ice._ModuleRegistry;
const Debug = Ice.Debug;
const ExUtil = Ice.ExUtil;
const FormatType = Ice.FormatType;
const OptionalFormat = Ice.OptionalFormat;
const Protocol = Ice.Protocol;
const TraceUtil = Ice.TraceUtil;
const ArrayUtil = Ice.ArrayUtil;
const SlicedData = Ice.SlicedData;
const SliceType =
{
NoSlice: 0,
ValueSlice: 1,
ExceptionSlice: 2
};
//
// Number.isNaN polyfill for compatibility with IE
//
// see: https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Number/isNaN
//
Number.isNaN = Number.isNaN || function(value)
{
return typeof value === "number" && isNaN(value);
};
//
// InputStream
//
class IndirectPatchEntry
{
constructor(index, cb)
{
this.index = index;
this.cb = cb;
}
}
class EncapsDecoder
{
constructor(stream, encaps, sliceValues, f)
{
this._stream = stream;
this._encaps = encaps;
this._sliceValues = sliceValues;
this._valueFactoryManager = f;
this._patchMap = null; // Lazy initialized, Maplhs
compares
* less than the identity in rhs
; 0 if the identities
* compare equal; 1, otherwise.
*
* @see ProxyIdentityKey
* @see ProxyIdentityAndFacetKey
* @see ProxyIdentityAndFacetCompare
**/
Ice.proxyIdentityCompare = function(lhs, rhs)
{
if(lhs === rhs)
{
return 0;
}
else if(lhs === null && rhs !== null)
{
return -1;
}
else if(lhs !== null && rhs === null)
{
return 1;
}
else
{
const lhsIdentity = lhs.ice_getIdentity();
const rhsIdentity = rhs.ice_getIdentity();
const n = lhsIdentity.name.localeCompare(rhsIdentity.name);
return (n !== 0) ? n : lhsIdentity.category.localeCompare(rhsIdentity.category);
}
};
/**
* Compares the object identities and facets of two proxies.
*
* @param lhs A proxy.
* @param rhs A proxy.
* @return -1 if the identity and facet in lhs
compare
* less than the identity and facet in rhs
; 0 if the identities
* and facets compare equal; 1, otherwise.
*
* @see ProxyIdentityAndFacetKey
* @see ProxyIdentityKey
* @see ProxyIdentityCompare
**/
Ice.proxyIdentityAndFacetCompare = function(lhs, rhs)
{
if(lhs === rhs)
{
return 0;
}
else if(lhs === null && rhs !== null)
{
return -1;
}
else if(lhs !== null && rhs === null)
{
return 1;
}
else
{
const lhsIdentity = lhs.ice_getIdentity();
const rhsIdentity = rhs.ice_getIdentity();
let n = lhsIdentity.name.localeCompare(rhsIdentity.name);
if(n !== 0)
{
return n;
}
n = lhsIdentity.category.localeCompare(rhsIdentity.category);
if(n !== 0)
{
return n;
}
const lhsFacet = lhs.ice_getFacet();
const rhsFacet = rhs.ice_getFacet();
if(lhsFacet === null && rhsFacet === null)
{
return 0;
}
else if(lhsFacet === null)
{
return -1;
}
else if(rhsFacet === null)
{
return 1;
}
return lhsFacet.localeCompare(rhsFacet);
}
};
}());
(function()
{
//
// Copyright (c) ZeroC, Inc. All rights reserved.
//
const AsyncStatus = Ice.AsyncStatus;
const AsyncResult = Ice.AsyncResult;
const InputStream = Ice.InputStream;
const OutputStream = Ice.OutputStream;
const Debug = Ice.Debug;
const RetryException = Ice.RetryException;
const Protocol = Ice.Protocol;
const Identity = Ice.Identity;
class OutgoingAsyncBase extends AsyncResult
{
constructor(communicator, operation, connection, proxy, adapter)
{
super(communicator, operation, connection, proxy, adapter);
this._os = new OutputStream(this._instance, Protocol.currentProtocolEncoding);
}
getOs()
{
return this._os;
}
sent()
{
this.markSent(true);
}
completedEx(ex)
{
this.markFinishedEx(ex);
}
}
class ProxyOutgoingAsyncBase extends OutgoingAsyncBase
{
constructor(prx, operation)
{
if (prx)
{
super(prx.ice_getCommunicator(), operation, null, prx, null);
}
else
{
super();
}
this._mode = null;
this._cnt = 0;
this._sent = false;
this._handler = null;
}
completedEx(ex)
{
try
{
this._instance.retryQueue().add(this, this.handleException(ex));
}
catch(ex)
{
this.markFinishedEx(ex);
}
}
retryException(ex)
{
try
{
this._proxy._updateRequestHandler(this._handler, null); // Clear request handler and always retry.
this._instance.retryQueue().add(this, 0);
}
catch(ex)
{
this.completedEx(ex);
}
}
retry()
{
this.invokeImpl(false);
}
abort(ex)
{
this.markFinishedEx(ex);
}
invokeImpl(userThread)
{
try
{
if(userThread)
{
const invocationTimeout = this._proxy._getReference().getInvocationTimeout();
if(invocationTimeout > 0)
{
this._timeoutToken = this._instance.timer().schedule(
() =>
{
this.cancelWithException(new Ice.InvocationTimeoutException());
},
invocationTimeout);
}
}
while(true)
{
try
{
this._sent = false;
this._handler = this._proxy._getRequestHandler();
if((this._handler.sendAsyncRequest(this) & AsyncStatus.Sent) > 0)
{
if(userThread)
{
this._sentSynchronously = true;
}
}
return; // We're done!
}
catch(ex)
{
if(ex instanceof RetryException)
{
// Clear request handler and always retry
this._proxy._updateRequestHandler(this._handler, null);
}
else
{
const interval = this.handleException(ex);
if(interval > 0)
{
this._instance.retryQueue().add(this, interval);
return;
}
}
}
}
}
catch(ex)
{
this.markFinishedEx(ex);
}
}
markSent(done)
{
this._sent = true;
if(done)
{
if(this._timeoutToken)
{
this._instance.timer().cancel(this._timeoutToken);
}
}
super.markSent.call(this, done);
}
markFinishedEx(ex)
{
if(this._timeoutToken)
{
this._instance.timer().cancel(this._timeoutToken);
}
super.markFinishedEx.call(this, ex);
}
handleException(ex)
{
const interval = {value: 0};
this._cnt = this._proxy._handleException(ex, this._handler, this._mode, this._sent, interval, this._cnt);
return interval.value;
}
}
class OutgoingAsync extends ProxyOutgoingAsyncBase
{
constructor(prx, operation, completed)
{
super(prx, operation);
if (prx)
{
this._encoding = Protocol.getCompatibleEncoding(this._proxy._getReference().getEncoding());
this._completed = completed;
}
}
prepare(op, mode, ctx)
{
Protocol.checkSupportedProtocol(Protocol.getCompatibleProtocol(this._proxy._getReference().getProtocol()));
this._mode = mode;
if(ctx === null)
{
ctx = OutgoingAsync._emptyContext;
}
if(this._proxy.ice_isBatchOneway() || this._proxy.ice_isBatchDatagram())
{
this._proxy._getBatchRequestQueue().prepareBatchRequest(this._os);
}
else
{
this._os.writeBlob(Protocol.requestHdr);
}
const ref = this._proxy._getReference();
ref.getIdentity()._write(this._os);
//
// For compatibility with the old FacetPath.
//
const facet = ref.getFacet();
if(facet === null || facet.length === 0)
{
Ice.StringSeqHelper.write(this._os, null);
}
else
{
Ice.StringSeqHelper.write(this._os, [facet]);
}
this._os.writeString(this._operation);
this._os.writeByte(mode.value);
if(ctx !== undefined)
{
if(ctx !== null && !(ctx instanceof Map))
{
throw new RangeError("illegal context value, expecting null or Map");
}
//
// Explicit context
//
Ice.ContextHelper.write(this._os, ctx);
}
else
{
//
// Implicit context
//
const implicitContext = ref.getInstance().getImplicitContext();
const prxContext = ref.getContext();
if(implicitContext === null)
{
Ice.ContextHelper.write(this._os, prxContext);
}
else
{
implicitContext.write(prxContext, this._os);
}
}
}
sent()
{
this.markSent(!this._proxy.ice_isTwoway());
}
invokeRemote(connection, response)
{
return connection.sendAsyncRequest(this, response, 0);
}
abort(ex)
{
if(this._proxy.ice_isBatchOneway() || this._proxy.ice_isBatchDatagram())
{
this._proxy._getBatchRequestQueue().abortBatchRequest(this._os);
}
super.abort(ex);
}
invoke()
{
if(this._proxy.ice_isBatchOneway() || this._proxy.ice_isBatchDatagram())
{
this._sentSynchronously = true;
this._proxy._getBatchRequestQueue().finishBatchRequest(this._os, this._proxy, this._operation);
this.markFinished(true);
return;
}
//
// NOTE: invokeImpl doesn't throw so this can be called from the
// try block with the catch block calling abort() in case of an
// exception.
//
this.invokeImpl(true); // userThread = true
}
completed(istr)
{
Debug.assert(this._proxy.ice_isTwoway()); // Can only be called for twoways.
let replyStatus;
try
{
if(this._is === null) // _is can already be initialized if the invocation is retried
{
this._is = new InputStream(this._instance, Protocol.currentProtocolEncoding);
}
this._is.swap(istr);
replyStatus = this._is.readByte();
switch(replyStatus)
{
case Protocol.replyOK:
case Protocol.replyUserException:
{
break;
}
case Protocol.replyObjectNotExist:
case Protocol.replyFacetNotExist:
case Protocol.replyOperationNotExist:
{
const id = new Identity();
id._read(this._is);
//
// For compatibility with the old FacetPath.
//
const facetPath = Ice.StringSeqHelper.read(this._is);
let facet;
if(facetPath.length > 0)
{
if(facetPath.length > 1)
{
throw new Ice.MarshalException();
}
facet = facetPath[0];
}
else
{
facet = "";
}
const operation = this._is.readString();
let rfe = null;
switch(replyStatus)
{
case Protocol.replyObjectNotExist:
{
rfe = new Ice.ObjectNotExistException();
break;
}
case Protocol.replyFacetNotExist:
{
rfe = new Ice.FacetNotExistException();
break;
}
case Protocol.replyOperationNotExist:
{
rfe = new Ice.OperationNotExistException();
break;
}
default:
{
Debug.assert(false);
break;
}
}
rfe.id = id;
rfe.facet = facet;
rfe.operation = operation;
throw rfe;
}
case Protocol.replyUnknownException:
case Protocol.replyUnknownLocalException:
case Protocol.replyUnknownUserException:
{
const unknown = this._is.readString();
let ue = null;
switch(replyStatus)
{
case Protocol.replyUnknownException:
{
ue = new Ice.UnknownException();
break;
}
case Protocol.replyUnknownLocalException:
{
ue = new Ice.UnknownLocalException();
break;
}
case Protocol.replyUnknownUserException:
{
ue = new Ice.UnknownUserException();
break;
}
default:
{
Debug.assert(false);
break;
}
}
ue.unknown = unknown;
throw ue;
}
default:
{
throw new Ice.UnknownReplyStatusException();
}
}
this.markFinished(replyStatus == Protocol.replyOK, this._completed);
}
catch(ex)
{
this.completedEx(ex);
}
}
startWriteParams(format)
{
this._os.startEncapsulation(this._encoding, format);
return this._os;
}
endWriteParams()
{
this._os.endEncapsulation();
}
writeEmptyParams()
{
this._os.writeEmptyEncapsulation(this._encoding);
}
startReadParams()
{
this._is.startEncapsulation();
return this._is;
}
endReadParams()
{
this._is.endEncapsulation();
}
readEmptyParams()
{
this._is.skipEmptyEncapsulation();
}
throwUserException()
{
Debug.assert((this._state & AsyncResult.Done) !== 0);
if((this._state & AsyncResult.OK) === 0)
{
try
{
this._is.startEncapsulation();
this._is.throwException();
}
catch(ex)
{
if(ex instanceof Ice.UserException)
{
this._is.endEncapsulation();
}
throw ex;
}
}
}
}
OutgoingAsync._emptyContext = new Map(); // Mapice_router
on specific
* proxies.
*
**/
Ice.Router = class extends Ice.Object
{
};
Ice.RouterPrx = class extends Ice.ObjectPrx
{
};
Slice.defineOperations(Ice.Router, Ice.RouterPrx, iceC_Ice_Router_ids, 1,
{
"getClientProxy": [, 2, 1, , [9], , [[1, , 1]], , , ],
"getServerProxy": [, 2, 1, , [9], , , , , ],
"addProxies": [, 2, 2, , ["Ice.ObjectProxySeqHelper"], [["Ice.ObjectProxySeqHelper"]], , , , ]
});
const iceC_Ice_RouterFinder_ids = [
"::Ice::Object",
"::Ice::RouterFinder"
];
/**
* This inferface should be implemented by services implementing the
* Ice::Router interface. It should be advertised through an Ice
* object with the identity `Ice/RouterFinder'. This allows clients to
* retrieve the router proxy with just the endpoint information of the
* service.
*
**/
Ice.RouterFinder = class extends Ice.Object
{
};
Ice.RouterFinderPrx = class extends Ice.ObjectPrx
{
};
Slice.defineOperations(Ice.RouterFinder, Ice.RouterFinderPrx, iceC_Ice_RouterFinder_ids, 1,
{
"getRouter": [, , , , ["Ice.RouterPrx"], , , , , ]
});
}());
(function()
{
//
// Copyright (c) ZeroC, Inc. All rights reserved.
//
const OutputStream = Ice.OutputStream;
const Current = Ice.Current;
const Debug = Ice.Debug;
const Context = Ice.Context;
const Identity = Ice.Identity;
const Protocol = Ice.Protocol;
const StringUtil = Ice.StringUtil;
class IncomingAsync
{
constructor(instance, connection, adapter, response, requestId)
{
this._instance = instance;
this._response = response;
this._connection = connection;
this._format = Ice.FormatType.DefaultFormat;
this._current = new Current();
this._current.id = new Identity();
this._current.adapter = adapter;
this._current.con = this._connection;
this._current.requestId = requestId;
this._servant = null;
this._locator = null;
this._cookie = {value: null};
this._os = null;
this._is = null;
}
startWriteParams()
{
if(!this._response)
{
throw new Ice.MarshalException("can't marshal out parameters for oneway dispatch");
}
Debug.assert(this._current.encoding !== null); // Encoding for reply is known.
this._os = new OutputStream(this._instance, Protocol.currentProtocolEncoding);
this._os.writeBlob(Protocol.replyHdr);
this._os.writeInt(this._current.requestId);
this._os.writeByte(0);
this._os.startEncapsulation(this._current.encoding, this._format);
return this._os;
}
endWriteParams()
{
if(this._response)
{
this._os.endEncapsulation();
}
}
writeEmptyParams()
{
if(this._response)
{
Debug.assert(this._current.encoding !== null); // Encoding for reply is known.
this._os = new OutputStream(this._instance, Protocol.currentProtocolEncoding);
this._os.writeBlob(Protocol.replyHdr);
this._os.writeInt(this._current.requestId);
this._os.writeByte(Protocol.replyOK);
this._os.writeEmptyEncapsulation(this._current.encoding);
}
}
writeParamEncaps(v, ok)
{
if(this._response)
{
Debug.assert(this._current.encoding !== null); // Encoding for reply is known.
this._os = new OutputStream(this._instance, Protocol.currentProtocolEncoding);
this._os.writeBlob(Protocol.replyHdr);
this._os.writeInt(this._current.requestId);
this._os.writeByte(ok ? Protocol.replyOK : Protocol.replyUserException);
if(v === null || v.length === 0)
{
this._os.writeEmptyEncapsulation(this._current.encoding);
}
else
{
this._os.writeEncapsulation(v);
}
}
}
setFormat(format)
{
this._format = format;
}
warning(ex)
{
Debug.assert(this._instance !== null);
const s = [];
s.push("dispatch exception:");
s.push("\nidentity: " + Ice.identityToString(this._current.id, this._instance.toStringMode()));
s.push("\nfacet: " + StringUtil.escapeString(this._current.facet, "", this._instance.toStringMode()));
s.push("\noperation: " + this._current.operation);
if(this._connection !== null)
{
try
{
for(let p = this._connection.getInfo(); p; p = p.underlying)
{
if(p instanceof Ice.IPConnectionInfo)
{
s.push("\nremote host: " + p.remoteAddress + " remote port: " + p.remotePort);
}
}
}
catch(exc)
{
// Ignore.
}
}
if(ex.stack)
{
s.push("\n");
s.push(ex.stack);
}
this._instance.initializationData().logger.warning(s.join(""));
}
handleException(ex, amd)
{
Debug.assert(this._connection !== null);
const props = this._instance.initializationData().properties;
if(ex instanceof Ice.RequestFailedException)
{
if(ex.id === null)
{
ex.id = this._current.id;
}
if(ex.facet === null)
{
ex.facet = this._current.facet;
}
if(ex.operation === null || ex.operation.length === 0)
{
ex.operation = this._current.operation;
}
if(props.getPropertyAsIntWithDefault("Ice.Warn.Dispatch", 1) > 1)
{
this.warning(ex);
}
if(this._response)
{
this._os = new OutputStream(this._instance, Protocol.currentProtocolEncoding);
this._os.writeBlob(Protocol.replyHdr);
this._os.writeInt(this._current.requestId);
if(ex instanceof Ice.ObjectNotExistException)
{
this._os.writeByte(Protocol.replyObjectNotExist);
}
else if(ex instanceof Ice.FacetNotExistException)
{
this._os.writeByte(Protocol.replyFacetNotExist);
}
else if(ex instanceof Ice.OperationNotExistException)
{
this._os.writeByte(Protocol.replyOperationNotExist);
}
else
{
Debug.assert(false);
}
ex.id._write(this._os);
//
// For compatibility with the old FacetPath.
//
if(ex.facet === null || ex.facet.length === 0)
{
Ice.StringSeqHelper.write(this._os, null);
}
else
{
Ice.StringSeqHelper.write(this._os, [ex.facet]);
}
this._os.writeString(ex.operation);
this._connection.sendResponse(this._os);
}
else
{
this._connection.sendNoResponse();
}
}
else if(ex instanceof Ice.UnknownLocalException)
{
if(props.getPropertyAsIntWithDefault("Ice.Warn.Dispatch", 1) > 0)
{
this.warning(ex);
}
if(this._response)
{
this._os = new OutputStream(this._instance, Protocol.currentProtocolEncoding);
this._os.writeBlob(Protocol.replyHdr);
this._os.writeInt(this._current.requestId);
this._os.writeByte(Protocol.replyUnknownLocalException);
this._os.writeString(ex.unknown);
this._connection.sendResponse(this._os);
}
else
{
this._connection.sendNoResponse();
}
}
else if(ex instanceof Ice.UnknownUserException)
{
if(props.getPropertyAsIntWithDefault("Ice.Warn.Dispatch", 1) > 0)
{
this.warning(ex);
}
if(this._response)
{
this._os = new OutputStream(this._instance, Protocol.currentProtocolEncoding);
this._os.writeBlob(Protocol.replyHdr);
this._os.writeInt(this._current.requestId);
this._os.writeByte(Protocol.replyUnknownUserException);
this._os.writeString(ex.unknown);
this._connection.sendResponse(this._os);
}
else
{
this._connection.sendNoResponse();
}
}
else if(ex instanceof Ice.UnknownException)
{
if(props.getPropertyAsIntWithDefault("Ice.Warn.Dispatch", 1) > 0)
{
this.warning(ex);
}
if(this._response)
{
this._os = new OutputStream(this._instance, Protocol.currentProtocolEncoding);
this._os.writeBlob(Protocol.replyHdr);
this._os.writeInt(this._current.requestId);
this._os.writeByte(Protocol.replyUnknownException);
this._os.writeString(ex.unknown);
this._connection.sendResponse(this._os);
}
else
{
this._connection.sendNoResponse();
}
}
else if(ex instanceof Ice.LocalException)
{
if(props.getPropertyAsIntWithDefault("Ice.Warn.Dispatch", 1) > 0)
{
this.warning(ex);
}
if(this._response)
{
this._os = new OutputStream(this._instance, Protocol.currentProtocolEncoding);
this._os.writeBlob(Protocol.replyHdr);
this._os.writeInt(this._current.requestId);
this._os.writeByte(Protocol.replyUnknownLocalException);
// this._os.writeString(ex.toString());
const s = [ex.ice_id()];
if(ex.stack)
{
s.push("\n");
s.push(ex.stack);
}
this._os.writeString(s.join(""));
this._connection.sendResponse(this._os);
}
else
{
this._connection.sendNoResponse();
}
}
else if(ex instanceof Ice.UserException)
{
if(this._response)
{
this._os = new OutputStream(this._instance, Protocol.currentProtocolEncoding);
this._os.writeBlob(Protocol.replyHdr);
this._os.writeInt(this._current.requestId);
this._os.writeByte(Protocol.replyUserException);
this._os.startEncapsulation(this._current.encoding, this._format);
this._os.writeException(ex);
this._os.endEncapsulation();
this._connection.sendResponse(this._os);
}
else
{
this._connection.sendNoResponse();
}
}
else
{
if(props.getPropertyAsIntWithDefault("Ice.Warn.Dispatch", 1) > 0)
{
this.warning(ex);
}
if(this._response)
{
this._os = new OutputStream(this._instance, Protocol.currentProtocolEncoding);
this._os.writeBlob(Protocol.replyHdr);
this._os.writeInt(this._current.requestId);
this._os.writeByte(Protocol.replyUnknownException);
this._os.writeString(ex.toString() + (ex.stack ? "\n" + ex.stack : ""));
this._connection.sendResponse(this._os);
}
else
{
this._connection.sendNoResponse();
}
}
this._connection = null;
}
invoke(servantManager, stream)
{
this._is = stream;
//
// Read the current.
//
this._current.id._read(this._is);
//
// For compatibility with the old FacetPath.
//
const facetPath = Ice.StringSeqHelper.read(this._is);
if(facetPath.length > 0)
{
if(facetPath.length > 1)
{
throw new Ice.MarshalException();
}
this._current.facet = facetPath[0];
}
else
{
this._current.facet = "";
}
this._current.operation = this._is.readString();
this._current.mode = Ice.OperationMode.valueOf(this._is.readByte());
this._current.ctx = new Context();
let sz = this._is.readSize();
while(sz-- > 0)
{
this._current.ctx.set(this._is.readString(), this._is.readString());
}
//
// Don't put the code above into the try block below. Exceptions
// in the code above are considered fatal, and must propagate to
// the caller of this operation.
//
if(servantManager !== null)
{
this._servant = servantManager.findServant(this._current.id, this._current.facet);
if(this._servant === null)
{
this._locator = servantManager.findServantLocator(this._current.id.category);
if(this._locator === null && this._current.id.category.length > 0)
{
this._locator = servantManager.findServantLocator("");
}
if(this._locator !== null)
{
try
{
this._servant = this._locator.locate(this._current, this._cookie);
}
catch(ex)
{
this.skipReadParams(); // Required for batch requests.
this.handleException(ex, false);
return;
}
}
}
}
if(this._servant === null)
{
try
{
if(servantManager !== null && servantManager.hasServant(this._current.id))
{
throw new Ice.FacetNotExistException(this._current.id, this._current.facet,
this._current.operation);
}
else
{
throw new Ice.ObjectNotExistException(this._current.id, this._current.facet,
this._current.operation);
}
}
catch(ex)
{
this.skipReadParams(); // Required for batch requests.
this.handleException(ex, false);
return;
}
}
try
{
Debug.assert(this._servant !== null);
const promise = this._servant._iceDispatch(this, this._current);
if(promise !== null)
{
promise.then(() => this.completed(null, true),
ex => this.completed(ex, true));
return;
}
Debug.assert(!this._response || this._os !== null);
this.completed(null, false);
}
catch(ex)
{
this.completed(ex, false);
}
}
startReadParams()
{
//
// Remember the encoding used by the input parameters, we'll
// encode the response parameters with the same encoding.
//
this._current.encoding = this._is.startEncapsulation();
return this._is;
}
endReadParams()
{
this._is.endEncapsulation();
}
readEmptyParams()
{
this._current.encoding = this._is.skipEmptyEncapsulation();
}
readParamEncaps()
{
this._current.encoding = new Ice.EncodingVersion();
return this._is.readEncapsulation(this._current.encoding);
}
skipReadParams()
{
this._current.encoding = this._is.skipEncapsulation();
}
completed(exc, amd)
{
try
{
if(this._locator !== null)
{
Debug.assert(this._locator !== null && this._servant !== null);
try
{
this._locator.finished(this._current, this._servant, this._cookie.value);
}
catch(ex)
{
this.handleException(ex, amd);
return;
}
}
Debug.assert(this._connection !== null);
if(exc !== null)
{
this.handleException(exc, amd);
}
else if(this._response)
{
this._connection.sendResponse(this._os);
}
else
{
this._connection.sendNoResponse();
}
}
catch(ex)
{
if(ex instanceof Ice.LocalException)
{
this._connection.invokeException(ex, 1);
}
else
{
throw ex;
}
}
this._connection = null;
}
}
Ice.IncomingAsync = IncomingAsync;
}());
(function()
{
//
// Copyright (c) ZeroC, Inc. All rights reserved.
//
const Debug = Ice.Debug;
class ACMConfig
{
constructor(p, l, prefix, dflt)
{
if(p === undefined)
{
this.timeout = 60 * 1000;
this.heartbeat = Ice.ACMHeartbeat.HeartbeatOnDispatch;
this.close = Ice.ACMClose.CloseOnInvocationAndIdle;
return;
}
let timeoutProperty;
if((prefix == "Ice.ACM.Client" || prefix == "Ice.ACM.Server") &&
p.getProperty(prefix + ".Timeout").length === 0)
{
timeoutProperty = prefix; // Deprecated property.
}
else
{
timeoutProperty = prefix + ".Timeout";
}
this.timeout = p.getPropertyAsIntWithDefault(timeoutProperty, dflt.timeout / 1000) * 1000; // To ms
if(this.timeout < 0)
{
l.warning("invalid value for property `" + timeoutProperty + "', default value will be used instead");
this.timeout = dflt.timeout;
}
const hb = p.getPropertyAsIntWithDefault(prefix + ".Heartbeat", dflt.heartbeat.value);
if(hb >= 0 && hb <= Ice.ACMHeartbeat.maxValue)
{
this.heartbeat = Ice.ACMHeartbeat.valueOf(hb);
}
else
{
l.warning("invalid value for property `" + prefix + ".Heartbeat" +
"', default value will be used instead");
this.heartbeat = dflt.heartbeat;
}
const cl = p.getPropertyAsIntWithDefault(prefix + ".Close", dflt.close.value);
if(cl >= 0 && cl <= Ice.ACMClose.maxValue)
{
this.close = Ice.ACMClose.valueOf(cl);
}
else
{
l.warning("invalid value for property `" + prefix + ".Close" +
"', default value will be used instead");
this.close = dflt.close;
}
}
}
class FactoryACMMonitor
{
constructor(instance, config)
{
this._instance = instance;
this._config = config;
this._reapedConnections = [];
this._connections = [];
}
destroy()
{
if(this._instance === null)
{
return;
}
this._instance = null;
}
add(connection)
{
if(this._config.timeout === 0)
{
return;
}
this._connections.push(connection);
if(this._connections.length == 1)
{
this._timerToken = this._instance.timer().scheduleRepeated(
() => this.runTimerTask(), this._config.timeout / 2);
}
}
remove(connection)
{
if(this._config.timeout === 0)
{
return;
}
const i = this._connections.indexOf(connection);
Debug.assert(i >= 0);
this._connections.splice(i, 1);
if(this._connections.length === 0)
{
this._instance.timer().cancel(this._timerToken);
}
}
reap(connection)
{
this._reapedConnections.push(connection);
}
acm(timeout, close, heartbeat)
{
Debug.assert(this._instance !== null);
const config = new ACMConfig();
config.timeout = this._config.timeout;
config.close = this._config.close;
config.heartbeat = this._config.heartbeat;
if(timeout !== undefined)
{
config.timeout = timeout * 1000; // To milliseconds
}
if(close !== undefined)
{
config.close = close;
}
if(heartbeat !== undefined)
{
config.heartbeat = heartbeat;
}
return new ConnectionACMMonitor(this, this._instance.timer(), config);
}
getACM()
{
return new Ice.ACM(this._config.timeout / 1000, this._config.close, this._config.heartbeat);
}
swapReapedConnections()
{
if(this._reapedConnections.length === 0)
{
return null;
}
const connections = this._reapedConnections;
this._reapedConnections = [];
return connections;
}
runTimerTask()
{
if(this._instance === null)
{
this._connections = null;
return;
}
//
// Monitor connections outside the thread synchronization, so
// that connections can be added or removed during monitoring.
//
const now = Date.now();
this._connections.forEach(connection =>
{
try
{
connection.monitor(now, this._config);
}
catch(ex)
{
this.handleException(ex);
}
});
}
handleException(ex)
{
if(this._instance === null)
{
return;
}
this._instance.initializationData().logger.error("exception in connection monitor:\n" + ex);
}
}
class ConnectionACMMonitor
{
constructor(parent, timer, config)
{
this._parent = parent;
this._timer = timer;
this._config = config;
this._connection = null;
}
add(connection)
{
Debug.assert(this._connection === null);
this._connection = connection;
if(this._config.timeout > 0)
{
this._timerToken = this._timer.scheduleRepeated(() => this.runTimerTask(), this._config.timeout / 2);
}
}
remove(connection)
{
Debug.assert(this._connection === connection);
this._connection = null;
if(this._config.timeout > 0)
{
this._timer.cancel(this._timerToken);
}
}
reap(connection)
{
this._parent.reap(connection);
}
acm(timeout, close, heartbeat)
{
return this._parent.acm(timeout, close, heartbeat);
}
getACM()
{
return new Ice.ACM(this._config.timeout / 1000, this._config.close, this._config.heartbeat);
}
runTimerTask()
{
try
{
this._connection.monitor(Date.now(), this._config);
}
catch(ex)
{
this._parent.handleException(ex);
}
}
}
Ice.FactoryACMMonitor = FactoryACMMonitor;
Ice.ACMConfig = ACMConfig;
}());
(function()
{
//
// Copyright (c) ZeroC, Inc. All rights reserved.
//
//
// Ice version 3.7.5
//
// A servant implementing this interface is a potential target
* for denial-of-service attacks, therefore proper security precautions
* should be taken. For example, the servant can use a UUID to make its
* identity harder to guess, and be registered in an object adapter with
* a secured endpoint.
*
**/
Ice.Process = class extends Ice.Object
{
};
Ice.ProcessPrx = class extends Ice.ObjectPrx
{
};
Slice.defineOperations(Ice.Process, Ice.ProcessPrx, iceC_Ice_Process_ids, 1,
{
"shutdown": [, , , , , , , , , ],
"writeMessage": [, , , , , [[7], [3]], , , , ]
});
}());
(function()
{
//
// Copyright (c) ZeroC, Inc. All rights reserved.
//
const HashMap = Ice.HashMap;
const Debug = Ice.Debug;
class EndpointTableEntry
{
constructor(time, endpoints)
{
this.time = time;
this.endpoints = endpoints;
}
}
class ReferenceTableEntry
{
constructor(time, reference)
{
this.time = time;
this.reference = reference;
}
}
class LocatorTable
{
constructor()
{
this._adapterEndpointsTable = new Map(); // Map The {@link Locator} interface is intended to be used by
* Ice internals and by locator implementations. Regular user code
* should not attempt to use any functionality of this interface
* directly.
*
**/
Ice.Locator = class extends Ice.Object
{
};
Ice.LocatorPrx = class extends Ice.ObjectPrx
{
};
Slice.defineOperations(Ice.Locator, Ice.LocatorPrx, iceC_Ice_Locator_ids, 0,
{
"findObjectById": [, 2, 1, , [9], [[Ice.Identity]], ,
[
Ice.ObjectNotFoundException
], , ],
"findAdapterById": [, 2, 1, , [9], [[7]], ,
[
Ice.AdapterNotFoundException
], , ],
"getRegistry": [, 2, 1, , ["Ice.LocatorRegistryPrx"], , , , , ]
});
const iceC_Ice_LocatorRegistry_ids = [
"::Ice::LocatorRegistry",
"::Ice::Object"
];
/**
* The Ice locator registry interface. This interface is used by
* servers to register adapter endpoints with the locator.
*
* The {@link LocatorRegistry} interface is intended to be used
* by Ice internals and by locator implementations. Regular user
* code should not attempt to use any functionality of this interface
* directly.
*
**/
Ice.LocatorRegistry = class extends Ice.Object
{
};
Ice.LocatorRegistryPrx = class extends Ice.ObjectPrx
{
};
Slice.defineOperations(Ice.LocatorRegistry, Ice.LocatorRegistryPrx, iceC_Ice_LocatorRegistry_ids, 0,
{
"setAdapterDirectProxy": [, 2, 2, , , [[7], [9]], ,
[
Ice.AdapterAlreadyActiveException,
Ice.AdapterNotFoundException
], , ],
"setReplicatedAdapterDirectProxy": [, 2, 2, , , [[7], [7], [9]], ,
[
Ice.AdapterAlreadyActiveException,
Ice.AdapterNotFoundException,
Ice.InvalidReplicaGroupIdException
], , ],
"setServerProcessProxy": [, 2, 2, , , [[7], ["Ice.ProcessPrx"]], ,
[
Ice.ServerNotFoundException
], , ]
});
const iceC_Ice_LocatorFinder_ids = [
"::Ice::LocatorFinder",
"::Ice::Object"
];
/**
* This inferface should be implemented by services implementing the
* Ice::Locator interface. It should be advertised through an Ice
* object with the identity `Ice/LocatorFinder'. This allows clients
* to retrieve the locator proxy with just the endpoint information of
* the service.
*
**/
Ice.LocatorFinder = class extends Ice.Object
{
};
Ice.LocatorFinderPrx = class extends Ice.ObjectPrx
{
};
Slice.defineOperations(Ice.LocatorFinder, Ice.LocatorFinderPrx, iceC_Ice_LocatorFinder_ids, 0,
{
"getLocator": [, , , , ["Ice.LocatorPrx"], , , , , ]
});
}());
(function()
{
//
// Copyright (c) ZeroC, Inc. All rights reserved.
//
const AlreadyRegisteredException = Ice.AlreadyRegisteredException;
//
// Only for use by Instance
//
class ValueFactoryManagerI
{
constructor()
{
this._factoryMap = new Map(); // Map