eventreportrequestimpl.java
来自「CmisJavaApi」· Java 代码 · 共 146 行
JAVA
146 行
/* * The contents of this file are subject to the Dyade Public License, * as defined by the file DYADE_PUBLIC_LICENSE.TXT * * You may not use this file except in compliance with the License. You may * obtain a copy of the License on the Dyade web site (www.dyade.fr). * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for * the specific terms governing rights and limitations under the License. * * The Original Code is CmisJava API, including the java package * fr.dyade.cmis, released September 5, 2000. * * The Initial Developer of the Original Code is Dyade. The Original Code and * portions created by Dyade are Copyright Bull and Copyright INRIA. * All Rights Reserved. *//* Copyright 1996-2000 by Institut National de Recherche en Informatique * et en Automatique (INRIA) * All rights reserved. See COPYRIGHT in top-level directory. * * Authors: Laurent Andrey, Eric Dillon, Olivier Festor */// $Id: EventReportRequestImpl.java,v 1.2 2000/09/05 14:30:44 festor Exp $// $Source: /local/resedas/CVS-Repository/CmisJavaApi/src/fr/dyade/cmis/impl/operation/EventReportRequestImpl.java,v $//package fr.dyade.cmis.impl.operation;import java.util.Enumeration;import fr.dyade.cmis.api.*;import fr.dyade.cmis.api.types.*;import fr.dyade.cmis.api.operation.*;import fr.dyade.cmis.api.operation.event.*;import fr.dyade.cmis.impl.*;/** Basic implementation of an a CMIS CREATE operation. * This class mainly implements the <tt>EventReportRequest</tt> interface. * @version cvs $Id: EventReportRequestImpl.java,v 1.2 2000/09/05 14:30:44 festor Exp $ */public abstract class EventReportRequestImpl extends CMISRequestImpl implements EventReportRequest { protected EventReportRequestImpl( CMISStackImpl pStack ) { super(pStack, EVENT_REPORT_REQUEST); } public final Mode getMode() { return fMode; } public final ObjectClass getManagedObjectClass() { return fManagedObjectClass; } public final ObjectInstance getManagedObjectInstance() { return fManagedObjectInstance; } public final EventTypeId getEventType() { return fEventType; } public final Any getEventInformation() { return fEventInformation; } public final GeneralizedTime getEventTime() { return fEventTime; } public final void setMode(Mode pMode) { fMode=pMode; } public final void setManagedObjectClass(ObjectClass pClass ) { fManagedObjectClass=pClass; } public final void setManagedObjectInstance(ObjectInstance pOI) { fManagedObjectInstance=pOI; } public final void setEventType(EventTypeId pEventType) { fEventType=pEventType; } public final void setEventTime(GeneralizedTime pEventTime) { fEventTime=pEventTime; } public final void setEventInformation(Any pInfo) { fEventInformation=pInfo; } public final void addEventReportRequestListener( EventReportRequestListener pListener ) { addCMISListener(pListener); } public void removeEventReportRequestListener( EventReportRequestListener pListener ) { removeCMISListener(pListener); } public final synchronized void dispatchEvent( CMISEvent pEvent ) { if (pEvent instanceof EventReportConfirmationEvent) { EventReportConfirmationEvent lEvent=(EventReportConfirmationEvent)pEvent; lEvent.getRequest().addConfirmation(lEvent.getConfirmation()); synchronized (fCMISEventListener){ for (Enumeration e = fCMISEventListener.elements() ; e.hasMoreElements() ;) { ((EventReportRequestListener)e.nextElement()).confirmation(lEvent); } } } else { //LA:?? usefull if (pEvent instanceof EventReportCompletionEvent) { complete(); synchronized (fCMISEventListener){ for (Enumeration e = fCMISEventListener.elements() ; e.hasMoreElements() ;) { ((EventReportRequestListener)e.nextElement()).completion((EventReportCompletionEvent)pEvent); } endProcessing(); } } else { System.err.println("EventReportRequestImpl.java:dispatchEvent bad event type INTERNAL ERROR"); } } } /** * Effective public EventReport service invocation. */ public synchronized void doIt() throws CMISException { int lInvokeId; ensureIdle(); if (fMode==Mode.CONFIRMED) { synchronized(fStack.getPendingRequestQueueSynchronization()) { // fInvokeId has been affected by nativeDoIt. lInvokeId=nativeDoIt(); setInvokeId(new InvokeId(lInvokeId)); fStack.addPendingRequest(this); startProcessing(); // Well ensure start processing BEFORE stop by event dispatching! } } else { lInvokeId=nativeDoIt(); } } private ObjectClass fManagedObjectClass; private ObjectInstance fManagedObjectInstance; private EventTypeId fEventType; private Any fEventInformation; private Mode fMode; private GeneralizedTime fEventTime;} // EventReportRequestImpl
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?