Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
COOS - Connected Objects Operating System (www.connectedobjects.org). Copyright (C) 2009 Telenor ASA and Tellu AS. All rights reserved. DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. This library is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. You may also contact one of the following for additional information: Telenor ASA, Snaroyveien 30, N-1331 Fornebu, Norway (www.telenor.no) Tellu AS, Hagalokkveien 13, N-1383 Asker, Norway (www.tellu.no)
 
 package org.coos.messaging;
 

Author(s):
Knut Eilif Husa, Tellu AS The Endpoint that can receive and send messages to the bus and exchanges towards the consumer/producer
 
 public interface Endpoint extends ProcessorServiceLinkManager {
 
 	// framework plugins with fixed uuids that the Default endpoint communicates
 	// with
 	String ACCESS_CONTROL_ADDRESS = "coos://ac";
 	String LIFE_CYCLE_MANGER_ADDRESS = "coos://localcoos.UUID-lcm/lcm@LifeCycleManager"// Actorframe
 	// type
 	// of
 	// endpoint
 
 	// properties that this plugin uses
 	// the time time that the process exchange waits before it returns an error
 	String PROP_EXCHANGE_TIMEOUT = "timeout";
 	int DEFAULT_TIMEOUT = 10000; // 10 sec
 	String PROP_MAX_POOL_SIZE = "maxPoolSize";
 	int DEFAULT_MAX_POOL_SIZE = 2; // 
 
 	// login properties
 	String PROP_LOGIN_REQUIRED = "loginRequired";
 	String PROP_LOGIN_NAME = "loginname";
 	String PROP_PASSWORD = "password";
 
 	// LCM properties
 	String PROP_LCM_REGISTRATION_REQUIRED = "lcmRegRequired";
 	int PROP_LCM_POLLING_INTERVAL = 60000; // 1 min
 
 	// LCM States
 	String STATE_RUNNING = "Running";
 	String STATE_STARTUP_FAILED = "StartupFailed";
 	String STATE_STOPPING = "Stopping";
 	String STATE_STARTING = "Starting";
 	String STATE_INSTALLED = "Installed";
 	String STATE_PAUSED = "Paused";
 	String STATE_READY = "Ready";
 	String STATE_UPDATING = "Updating";
 	String STATE_UPGRADING = "Upgrading";
 	String STATE_UNINNSTALLED = "Uninstalled";
 
 	// Nameserver properties
 	String PROP_REG_REQUIRED = "registrationRequired";
 
 	// messages that the default endpoint handles
 
 	// EPRMEssageConstants
 
 	public void addAlias(String alias);
 
 	public void removeAlias(String alias);
 
 	public Vector getAliases();

Setter method for the uuid

Parameters:
uuid the uuid
 
 	public void setEndpointUuid(String uuid);

Getter for the endpoint uuid

Returns:
the uuid
 
 	public String getEndpointUuid();

Getter for the securityToken that is issued from the access manager

Returns:
Creates a new consumer that consumes exchanges from the endpoint. An endpoint will only have one consumer associated

Returns:
a newly created consumer
Creates a new producer which is used send messages into the message bus

Returns:
a newly created producer
Create a new exchange for communicating with this endpoint
Create a new exchange for communicating with this endpoint with the specified ExchangePattern such as whether its going to be an ExchangePattern.OutOnly or ExchangePattern.OutIn exchange

Parameters:
pattern the message exchange pattern for the exchange
Returns the string representation of the endpoint URI

Returns:
the uri iString representation
Setter for the endpoint Uri

Parameters:
endpointUri the endpoint Uri
	void setEndpointUri(String endpointUri);

Processing the outwards exchange

Parameters:
exchange the exchange to be processed
Returns:
the processed exchange
	public Exchange processExchange(Exchange exchange);

Processing the exchange with asynchronous notification when the exchange is ready

Parameters:
exchange the exchange to be processed
callback the callback
	public void processExchange(Exchange exchangeAsyncCallback callback);

This method initalizes the endpoint
	public void initializeEndpoint();

This method shuts down the endpoint
	public void shutDownEndpoint();

Returns the endpoint state, Can be one of: STATE_RUNNING, STATE_STARTUP_FAILED, STATE_STOPPING, STATE_STARTING, STATE_INSTALLED, STATE_PAUSED, STATE_READY, STATE_UPDATING, STATE_UPGRADING, STATE_UNINNSTALLED

Returns:
the state
Sets the Endpoint state. Can be one of: STATE_RUNNING, STATE_STARTUP_FAILED, STATE_STOPPING, STATE_STARTING, STATE_INSTALLED, STATE_PAUSED, STATE_READY, STATE_UPDATING, STATE_UPGRADING, STATE_UNINNSTALLED

Parameters:
endpointState
	public void setEndpointState(String endpointState);

If this Endpoint contains a complex structure this method allows for setting the State on a inner child

Parameters:
childName
state
	public void setChildEndpointState(String childNameString state);

Reports the state of your endpoint to the LCM
	public void reportState() throws EndpointException;

Reports the state of the given child to the LCM

Parameters:
childName
	public void reportChildState(String childNamethrows EndpointException;

If this Endpoint contains a complex structure this method returns the State of a inner child

Parameters:
childName
Returns:
the State
	public String getChildEndpointState(String childName);

This method allows you to subscribe for notifications using a SubscriptionFilter

Parameters:
filter the subscription filter
	public void subscribe(SubscriptionFilter filter);

Unsubscribes a specific subscription

Parameters:
filter the subscription to be cancelled
	public void unsubscribe(SubscriptionFilter filter);

Unsubscribes all current subscritpions
	public void unsubscribe();

Publish notifications using Notification.

Parameters:
notification the notification
	public void publish(Notification notification);
	public void setPlugin(Plugin plugin);
	public Plugin getPlugin();
New to GrepCode? Check out our FAQ X