001: /*
002: * Licensed to the Apache Software Foundation (ASF) under one or more
003: * contributor license agreements. See the NOTICE file distributed with
004: * this work for additional information regarding copyright ownership.
005: * The ASF licenses this file to You under the Apache License, Version 2.0
006: * (the "License"); you may not use this file except in compliance with
007: * the License. You may obtain a copy of the License at
008: *
009: * http://www.apache.org/licenses/LICENSE-2.0
010: *
011: * Unless required by applicable law or agreed to in writing, software
012: * distributed under the License is distributed on an "AS IS" BASIS,
013: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014: *
015: * See the License for the specific language governing permissions and
016: * limitations under the License.
017: */
018:
019: /**
020: * @author Victor A. Martynov
021: * @version $Revision: 1.1.2.5 $
022: */package org.apache.harmony.rmi.common;
023:
024: import org.apache.harmony.rmi.internal.nls.Messages;
025:
026: /**
027: * The constants of the RMI and Activation framework.
028: * @author Victor A. Martynov
029: * @version $Revision: 1.1.2.5 $
030: */
031: public interface RMIConstants {
032: /*
033: * -------------------------------------------------------------------------
034: * proxy constants
035: * -------------------------------------------------------------------------
036: */
037:
038: /**
039: * Default HTTP proxy port number to use
040: * if {@link RMIProperties#PROXY_PORT_PROP} is not set.
041: */
042: public static final int HTTP_DEFAULT_PORT = 80;
043:
044: /*
045: * ************************************************************************
046: * Default values for RMI Activation.
047: * ************************************************************************
048: */
049: /**
050: * The default filename to store snapshots of the RMID's state.
051: */
052: public static final String DEFAULT_SNAPSHOT_FILE = "snapshot.rmid"; //$NON-NLS-1$
053:
054: /**
055: * The default filename to store deltas of the RMID's state between snapshots.
056: */
057: public static final String DEFAULT_DELTA_FILE = "delta.rmid"; //$NON-NLS-1$
058:
059: /**
060: * The default folder to store rmid log (snapshot and delta).
061: */
062: public static final String DEFAULT_LOG_FOLDER = "log"; //$NON-NLS-1$
063: /**
064: * "Well-Known" ObjID for Activation System.
065: */
066: public static final int ACTIVATION_SYSTEM_ID = 4;
067:
068: /**
069: * The usage of RMID tool.
070: *
071: * rmi.console.0E=\nUsage: rmid <options>
072: * rmi.console.0F=\n\nwhere <options> include:
073: * rmi.console.10=\n-port <port> Specify port for rmid to use
074: * rmi.console.11=\n-log <directory> Specify directory in which rmid writes log
075: * rmi.console.12=\n-stop Stop current invocation of rmid (for specified port)
076: * rmi.console.13=\n-C<runtime flag> Pass argument to each child process (activation group)
077: * rmi.console.14=\n-J<runtime flag> Pass argument to the java interpreter
078: * rmi.console.15=\n-help Prints this help message
079: * rmi.console.16=\n------------------ Nonstandard options ------------------
080: * rmi.console.17=\n-monitor Starts rmid with monitoring on
081: */
082: public static final String RMID_USAGE = Messages
083: .getString("rmi.console.0E") + //$NON-NLS-1$
084: Messages.getString("rmi.console.0F") + //$NON-NLS-1$
085: Messages.getString("rmi.console.10") + //$NON-NLS-1$
086: Messages.getString("rmi.console.11") + //$NON-NLS-1$
087: Messages.getString("rmi.console.12") + //$NON-NLS-1$
088: Messages.getString("rmi.console.13") + //$NON-NLS-1$
089: Messages.getString("rmi.console.14") + //$NON-NLS-1$
090: Messages.getString("rmi.console.15") + //$NON-NLS-1$
091: Messages.getString("rmi.console.16") + //$NON-NLS-1$
092: Messages.getString("rmi.console.17"); //$NON-NLS-1$
093:
094: /**
095: * The default timeout that is given to the ActivationGroup VM to
096: * start(milliseconds).
097: */
098: public static final long DEFAULT_ACTIVATION_EXECTIMEOUT = 30000;
099:
100: /**
101: * The state of RMID (as a database for ActivationGroups and
102: * ActivatableObjects) is saved on the harddrive and this operation is
103: * known as "snapshot". This variable represents the interval between
104: * the snapshots of the RMID current state.
105: */
106: public static final long DEFAULT_SNAPSHOTINTERVAL = 200;
107:
108: /**
109: * The amount of activation groups that may be started concurrently.
110: */
111: public static final long MAX_CONCURRENT_STARTING_GROUPS = 3;
112:
113: /**
114: * The default class name of the RMID monitor.
115: *
116: * @see org.apache.harmony.rmi.common.RMIProperties#ACTIVATION_MONITOR_CLASS_NAME_PROP
117: * @see org.apache.harmony.rmi.activation.RmidMonitorAdapter
118: */
119: public static final String DEFAULT_ACTIVATION_MONITOR_CLASS_NAME = "org.apache.harmony.rmi.activation.RmidMonitorAdapter"; //$NON-NLS-1$
120:
121: /**
122: * The default value of the activation group VM executable.
123: *
124: * @see RMIProperties#ACTIVATION_VM_EXECUTABLE_PROP
125: */
126: public static final String DEFAULT_ACTIVATION_VM_EXECUTABLE = "java"; //$NON-NLS-1$
127: }
|