1 /* 2 Copyright 2009 Ramon Servadei 3 4 Licensed under the Apache License, Version 2.0 (the "License"); 5 you may not use this file except in compliance with the License. 6 You may obtain a copy of the License at 7 8 http://www.apache.org/licenses/LICENSE-2.0 9 10 Unless required by applicable law or agreed to in writing, software 11 distributed under the License is distributed on an "AS IS" BASIS, 12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 See the License for the specific language governing permissions and 14 limitations under the License. 15 */ 16 package fulmine.distribution; 17 18 import fulmine.context.IPermissionProfile; 19 import fulmine.model.field.IntegerField; 20 import fulmine.model.field.StringField; 21 import fulmine.rpc.IRpcPublicationListener; 22 import fulmine.rpc.IRpcRegistry; 23 import fulmine.rpc.IRpcResult; 24 25 /** 26 * Handles requests from the local context to update remote containers. 27 * <p> 28 * Implementations need to handle the situation where the local context has not 29 * yet received the 'RPC registry' from the remote context and should thus cache 30 * any update requests until the RPC for updating remote containers is 31 * available. 32 * 33 * @see IRpcRegistry 34 * @author Ramon Servadei 35 */ 36 public interface IRemoteUpdateInvoker extends IRpcPublicationListener 37 { 38 /** 39 * Invoke the 'update remote container' RPC in the named remote context. 40 * Whether this is called before or after the RPC registry for the remote 41 * context is received is of no consequence; the invocation will occur only 42 * when the RPC registry has been received. 43 * 44 * @param remoteContextIdentity 45 * the remote context to invoke the RPC in 46 * @param identity 47 * the container identity, used to locate the container 48 * @param type 49 * the container type, used to locate the container 50 * @param domain 51 * the container domain, used to locate the container 52 * @param fieldName 53 * the field in the container to update 54 * @param valueAsString 55 * the new value for the field, in string form 56 * @param permissionApp 57 * the application permission of the context issuing the change, 58 * see {@link IPermissionProfile} 59 * @param permissionCode 60 * the permission of the context issuing the change, see 61 * {@link IPermissionProfile} 62 * @param originatingRemoteContextIdentity 63 * the identity of the remote context issuing the command 64 * 65 * @return the result from the RPC 66 * @see #RPC_TIMEOUT_PROPERTY 67 */ 68 IRpcResult invoke(String remoteContextIdentity, StringField identity, 69 IntegerField type, IntegerField domain, StringField fieldName, 70 StringField valueAsString, IntegerField permissionApp, 71 IntegerField permissionCode, 72 StringField originatingRemoteContextIdentity); 73 }