Class ServerGroupManager
- java.lang.Object
-
- org.omg.CORBA.LocalObject
-
- com.sun.corba.ee.impl.folb.ServerGroupManager
-
- All Implemented Interfaces:
GroupInfoServiceObserver,ORBConfigurator,java.io.Serializable,Object,IDLEntity,Interceptor,InterceptorOperations,IORInterceptor,IORInterceptorOperations,ORBInitializer,ORBInitializerOperations,ServerRequestInterceptor,ServerRequestInterceptorOperations
public class ServerGroupManager extends LocalObject implements GroupInfoServiceObserver, IORInterceptor, ORBConfigurator, ORBInitializer, ServerRequestInterceptor
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classServerGroupManager.MembershipChangeStateclassServerGroupManager.WorkerThread
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.StringbaseMsgprivate static java.lang.StringCLEARprivate Codeccodecprivate CSIv2SSLTaggedComponentHandlercsiv2SSLTaggedComponentHandlerprivate GroupInfoServicegisprivate booleaninitializedprivate ServerGroupManager.MembershipChangeStatemembershipChangeStateprivate java.lang.StringmembershipLabelprivate ORBorbprivate ReferenceFactoryManagerreferenceFactoryManagerprivate static longserialVersionUIDprivate static java.lang.StringSSLprivate static ORBUtilSystemExceptionwrapper
-
Constructor Summary
Constructors Constructor Description ServerGroupManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadapter_manager_state_changed(int managerId, short state)voidadapter_state_changed(ObjectReferenceTemplate[] templates, short state)private voidadapterName(java.lang.String[] arr)private voidaddingAddresses()private voidaddingInstanceInfoFor(java.lang.String name, int weight)private voidaddingMembershipLabel(java.lang.String ml)private voidalreadyChangingMembership()private voidalreadyInitialized()voidcomponents_established(IORInfo iorInfo)voidconfigure(DataCollector collector, ORB orb)voiddestroy()Provides an opportunity to destroy this interceptor.voidestablish_components(IORInfo iorInfo)A server side ORB calls theestablish_componentsoperation on all registeredIORInterceptorinstances when it is assembling the list of components that will be included in the profile or profiles of an object reference.private voidincludingEndpoint(SocketInfo si)private voidinitialize()private voidloopingForMembershipChange()voidmembershipChange()Called when the GroupInfoService that you register with has a change.private voidmembershipLabelsEqual()private voidmembershipLabelsNotEqual()private voidmembershipLabelsNotPresent()java.lang.Stringname()Returns the name of the interceptor.private voidnewMembershipLabel(java.lang.String ml)private voidnotAddingAddress()private voidnotAddingMembershipLabel()private voidnotManagedByReferenceFactory(java.lang.String[] adapterName)voidpost_init(ORBInitInfo info)Called during ORB initialization.voidpre_init(ORBInitInfo info)Called during ORB initialization.voidreceive_request(ServerRequestInfo ri)Allows an Interceptor to query request information after all the information, including operation parameters, are available.voidreceive_request_service_contexts(ServerRequestInfo ri)Allows the interceptor to process service context information.private voidrestartFactories()private voidrfmIsHolding()voidsend_exception(ServerRequestInfo ri)Allows an Interceptor to query the exception information and modify the reply service context before the exception is thrown to the client.voidsend_other(ServerRequestInfo ri)Allows an Interceptor to query the information available when a request results in something other than a normal reply or an exception.voidsend_reply(ServerRequestInfo ri)Allows an Interceptor to query reply information and modify the reply service context after the target operation has been invoked and before the reply is returned to the client.private voidsend_star(java.lang.String point, ServerRequestInfo ri)If the request membership label is out-of-date or missing then return an updated IOR.private voidsendingUpdatedIOR(java.lang.String[] adapterName)private voidskippingEndpoint(SocketInfo si)private voidunexpectedStateForMembershipChange()private voidupdateMembershipLabel()private voidwaitingForWorkerTermination()-
Methods inherited from class org.omg.CORBA.LocalObject
_create_request, _create_request, _duplicate, _get_domain_managers, _get_interface, _get_interface_def, _get_policy, _hash, _invoke, _is_a, _is_equivalent, _is_local, _non_existent, _orb, _release, _releaseReply, _request, _request, _servant_postinvoke, _servant_preinvoke, _set_policy_override, validate_connection
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.omg.CORBA.Object
_create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override
-
-
-
-
Field Detail
-
wrapper
private static final ORBUtilSystemException wrapper
-
baseMsg
private static final java.lang.String baseMsg
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
orb
private transient ORB orb
-
gis
private transient GroupInfoService gis
-
csiv2SSLTaggedComponentHandler
private transient CSIv2SSLTaggedComponentHandler csiv2SSLTaggedComponentHandler
-
membershipLabel
private java.lang.String membershipLabel
-
membershipChangeState
private ServerGroupManager.MembershipChangeState membershipChangeState
-
referenceFactoryManager
private ReferenceFactoryManager referenceFactoryManager
-
codec
private Codec codec
-
initialized
private boolean initialized
-
SSL
private static final java.lang.String SSL
- See Also:
- Constant Field Values
-
CLEAR
private static final java.lang.String CLEAR
- See Also:
- Constant Field Values
-
-
Method Detail
-
alreadyInitialized
@InfoMethod private void alreadyInitialized()
-
initialize
private void initialize()
-
name
public java.lang.String name()
Description copied from interface:InterceptorOperationsReturns the name of the interceptor.Each Interceptor may have a name that may be used administratively to order the lists of Interceptors. Only one Interceptor of a given name can be registered with the ORB for each Interceptor type. An Interceptor may be anonymous, i.e., have an empty string as the name attribute. Any number of anonymous Interceptors may be registered with the ORB.
- Specified by:
namein interfaceInterceptorOperations- Returns:
- the name of the interceptor.
-
destroy
public void destroy()
Description copied from interface:InterceptorOperationsProvides an opportunity to destroy this interceptor. The destroy method is called duringORB.destroy. When an application callsORB.destroy, the ORB:- waits for all requests in progress to complete
- calls the
Interceptor.destroyoperation for each interceptor - completes destruction of the ORB
Interceptor.destroyon object references for objects implemented on the ORB being destroyed result in undefined behavior. However, method invocations on objects implemented on an ORB other than the one being destroyed are permitted. (This means that the ORB being destroyed is still capable of acting as a client, but not as a server.)- Specified by:
destroyin interfaceInterceptorOperations
-
adapterName
@InfoMethod private void adapterName(java.lang.String[] arr)
-
addingAddresses
@InfoMethod private void addingAddresses()
-
notAddingAddress
@InfoMethod private void notAddingAddress()
-
addingMembershipLabel
@InfoMethod private void addingMembershipLabel(java.lang.String ml)
-
notAddingMembershipLabel
@InfoMethod private void notAddingMembershipLabel()
-
skippingEndpoint
@InfoMethod private void skippingEndpoint(SocketInfo si)
-
includingEndpoint
@InfoMethod private void includingEndpoint(SocketInfo si)
-
addingInstanceInfoFor
@InfoMethod private void addingInstanceInfoFor(java.lang.String name, int weight)
-
establish_components
public void establish_components(IORInfo iorInfo)
Description copied from interface:IORInterceptorOperationsA server side ORB calls theestablish_componentsoperation on all registeredIORInterceptorinstances when it is assembling the list of components that will be included in the profile or profiles of an object reference. This operation is not necessarily called for each individual object reference. In the case of the POA, this operation is called each time POA::create_POA is called. In any case,establish_componentsis guaranteed to be called at least once for each distinct set of server policies.An implementation of
establish_componentsmust not throw exceptions. If it does, the ORB shall ignore the exception and proceed to call the next IOR Interceptor'sestablish_componentsoperation.- Specified by:
establish_componentsin interfaceIORInterceptorOperations- Parameters:
iorInfo- TheIORInfoinstance used by the ORB service to query applicable policies and add components to be included in the generated IORs.
-
components_established
public void components_established(IORInfo iorInfo)
-
adapter_manager_state_changed
public void adapter_manager_state_changed(int managerId, short state)
-
adapter_state_changed
public void adapter_state_changed(ObjectReferenceTemplate[] templates, short state)
-
alreadyChangingMembership
@InfoMethod private void alreadyChangingMembership()
-
loopingForMembershipChange
@InfoMethod private void loopingForMembershipChange()
-
unexpectedStateForMembershipChange
@InfoMethod private void unexpectedStateForMembershipChange()
-
membershipChange
public void membershipChange()
Description copied from interface:GroupInfoServiceObserverCalled when the GroupInfoService that you register with has a change. You should call the GroupInfoServicegetClusterInstanceInfomethod to get updated info.- Specified by:
membershipChangein interfaceGroupInfoServiceObserver
-
waitingForWorkerTermination
@InfoMethod private void waitingForWorkerTermination()
-
restartFactories
private void restartFactories()
-
newMembershipLabel
@InfoMethod private void newMembershipLabel(java.lang.String ml)
-
updateMembershipLabel
private void updateMembershipLabel()
-
receive_request_service_contexts
public void receive_request_service_contexts(ServerRequestInfo ri)
Description copied from interface:ServerRequestInterceptorOperationsAllows the interceptor to process service context information.At this interception point, Interceptors must get their service context information from the incoming request transfer it to
PortableInterceptor.Current's slots.This interception point is called before the servant manager is called. Operation parameters are not yet available at this point. This interception point may or may not execute in the same thread as the target invocation.
This interception point may throw a system exception. If it does, no other Interceptors'
receive_request_service_contextsoperations are called. Those Interceptors on the Flow Stack are popped and theirsend_exceptioninterception points are called.This interception point may also throw a
ForwardRequestexception. If an Interceptor throws this exception, no other Interceptors'receive_request_service_contextsoperations are called. Those Interceptors on the Flow Stack are popped and theirsend_otherinterception points are called.Compliant Interceptors shall properly follow
completion_statussemantics if they throw a system exception from this interception point. Thecompletion_statusshall be COMPLETED_NO.- Specified by:
receive_request_service_contextsin interfaceServerRequestInterceptorOperations- Parameters:
ri- Information about the current request being intercepted.
-
receive_request
public void receive_request(ServerRequestInfo ri)
Description copied from interface:ServerRequestInterceptorOperationsAllows an Interceptor to query request information after all the information, including operation parameters, are available. This interception point shall execute in the same thread as the target invocation.In the DSI model, since the parameters are first available when the user code calls
arguments,receive_requestis called from withinarguments. It is possible thatargumentsis not called in the DSI model. The target may callset_exceptionbefore callingarguments. The ORB shall guarantee thatreceive_requestis called once, either throughargumentsor throughset_exception. If it is called throughset_exception, requesting the arguments will result inNO_RESOURCESbeing thrown with a standard minor code of 1.This interception point may throw a system exception. If it does, no other Interceptors'
receive_requestoperations are called. Those Interceptors on the Flow Stack are popped and theirsend_exceptioninterception points are called.This interception point may also throw a
ForwardRequestexception. If an Interceptor throws this exception, no other Interceptors'receive_requestoperations are called. Those Interceptors on the Flow Stack are popped and theirsend_otherinterception points are called.Compliant Interceptors shall properly follow
completion_statussemantics if they throw a system exception from this interception point. Thecompletion_statusshall beCOMPLETED_NO.- Specified by:
receive_requestin interfaceServerRequestInterceptorOperations- Parameters:
ri- Information about the current request being intercepted.
-
send_reply
public void send_reply(ServerRequestInfo ri)
Description copied from interface:ServerRequestInterceptorOperationsAllows an Interceptor to query reply information and modify the reply service context after the target operation has been invoked and before the reply is returned to the client. This interception point shall execute in the same thread as the target invocation.This interception point may throw a system exception. If it does, no other Interceptors'
send_replyoperations are called. The remaining Interceptors in the Flow Stack shall have theirsend_exceptioninterception point called.Compliant Interceptors shall properly follow
completion_statussemantics if they throw a system exception from this interception point. Thecompletion_statusshall beCOMPLETED_YES.- Specified by:
send_replyin interfaceServerRequestInterceptorOperations- Parameters:
ri- Information about the current request being intercepted.
-
send_exception
public void send_exception(ServerRequestInfo ri)
Description copied from interface:ServerRequestInterceptorOperationsAllows an Interceptor to query the exception information and modify the reply service context before the exception is thrown to the client. When an exception occurs, this interception point is called. This interception point shall execute in the same thread as the target invocation.This interception point may throw a system exception. This has the effect of changing the exception which successive Interceptors popped from the Flow Stack receive on their calls to
send_exception. The exception thrown to the client will be the last exception thrown by an Interceptor, or the original exception if no Interceptor changes the exception.This interception point may also throw a
ForwardRequestexception. If an Interceptor throws this exception, no other Interceptors'send_exceptionoperations are called. The remaining Interceptors in the Flow Stack shall have theirsend_otherinterception points called.If the
completion_statusof the exception is notCOMPLETED_NO, then it is inappropriate for this interception point to throw aForwardRequestexception. The request's at-most-once semantics would be lost.Compliant Interceptors shall properly follow
completion_statussemantics if they throw a system exception from this interception point. If the original exception is a system exception, thecompletion_statusof the new exception shall be the same as on the original. If the original exception is a user exception, then thecompletion_statusof the new exception shall beCOMPLETED_YES.- Specified by:
send_exceptionin interfaceServerRequestInterceptorOperations- Parameters:
ri- Information about the current request being intercepted.
-
send_other
public void send_other(ServerRequestInfo ri)
Description copied from interface:ServerRequestInterceptorOperationsAllows an Interceptor to query the information available when a request results in something other than a normal reply or an exception. For example, a request could result in a retry (e.g., a GIOP Reply with aLOCATION_FORWARDstatus was received). This interception point shall execute in the same thread as the target invocation.This interception point may throw a system exception. If it does, no other Interceptors'
send_otheroperations are called. The remaining Interceptors in the Flow Stack shall have theirsend_exceptioninterception points called.This interception point may also throw a
ForwardRequestexception. If an Interceptor throws this exception, successive Interceptors'send_otheroperations are called with the new information provided by theForwardRequestexception.Compliant Interceptors shall properly follow
completion_statussemantics if they throw a system exception from this interception point. Thecompletion_statusshall beCOMPLETED_NO.- Specified by:
send_otherin interfaceServerRequestInterceptorOperations- Parameters:
ri- Information about the current request being intercepted.
-
rfmIsHolding
@InfoMethod private void rfmIsHolding()
-
notManagedByReferenceFactory
@InfoMethod private void notManagedByReferenceFactory(java.lang.String[] adapterName)
-
membershipLabelsEqual
@InfoMethod private void membershipLabelsEqual()
-
membershipLabelsNotEqual
@InfoMethod private void membershipLabelsNotEqual()
-
membershipLabelsNotPresent
@InfoMethod private void membershipLabelsNotPresent()
-
sendingUpdatedIOR
@InfoMethod private void sendingUpdatedIOR(java.lang.String[] adapterName)
-
send_star
private void send_star(java.lang.String point, ServerRequestInfo ri)If the request membership label is out-of-date or missing then return an updated IOR.
-
pre_init
public void pre_init(ORBInitInfo info)
Description copied from interface:ORBInitializerOperationsCalled during ORB initialization. If it is expected that initial services registered by an interceptor will be used by other interceptors, then those initial services shall be registered at this point via calls toORBInitInfo.register_initial_reference.- Specified by:
pre_initin interfaceORBInitializerOperations- Parameters:
info- provides initialization attributes and operations by which Interceptors can be registered.
-
post_init
public void post_init(ORBInitInfo info)
Description copied from interface:ORBInitializerOperationsCalled during ORB initialization. If a service must resolve initial references as part of its initialization, it can assume that all initial references will be available at this point.Calling the
post_initoperations is not the final task of ORB initialization. The final task, following thepost_initcalls, is attaching the lists of registered interceptors to the ORB. Therefore, the ORB does not contain the interceptors during calls topost_init. If an ORB-mediated call is made from withinpost_init, no request interceptors will be invoked on that call. Likewise, if an operation is performed which causes an IOR to be created, no IOR interceptors will be invoked.- Specified by:
post_initin interfaceORBInitializerOperations- Parameters:
info- provides initialization attributes and operations by which Interceptors can be registered.
-
configure
public void configure(DataCollector collector, ORB orb)
- Specified by:
configurein interfaceORBConfigurator
-
-